home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue63 / Debug / HVBordebug / BorDebug.pas next >
Encoding:
Pascal/Delphi Source File  |  2000-10-02  |  107.0 KB  |  2,172 lines

  1. unit BorDebug;
  2. {
  3.     This set of API's facilitates the reading of debug information
  4.     in *.TDS, *.EXE, and *.DLL files, as produced by the Borland
  5.     32 bit compilers.
  6.  
  7.     Written by Hallvard Vassbotn (hallvard@balder.no), March 1999.
  8.  
  9.     Acknowledgements:
  10.     * Based on C header file written by Keimpe Bronkhorst.
  11.       Note that the original comments have not been copied into this unit.
  12.       Use the original Bordebug.h as documentation.
  13.     * Initial version based on Roy Nelson's version (created with Dr Bob's HeadConv)
  14.     * Thanks to Andre v.d Merwe for constructive critique and good ideas.
  15.  
  16.     History:
  17.     20.03.99 HV Created
  18.     29.03.99 HV Added types, conditional delayloading using HVDll (define DYNLINK_BORDEBUG)
  19.     29.03.99 HV Made it D4 compatible,
  20.                 Fixed TTypeKind, TTypeIndex, BorDebugSrcModuleSourceRanges
  21.     30.03.99 HV Changed S_XXXX to BORDEBUG_S_XXXX
  22.                 Changed LF_XXXX to BORDEBUG_LF_XXXX
  23.                 Added BORDEBUG_LF_WSTRING
  24.                 Updated parameter names to better match Bordebug.h
  25.                 Added some extra functionality, controlled by DEFINE BORDEB_EXTRAS
  26.                 Compiles in D2, D3 and D4
  27.     06.04.99 HV Added BorDebugUnmangle API
  28.                 Added BORDEBUG_UM_ constants
  29.                 Added TBorDebugUmKind
  30.                 Made constants use 8 hex digits
  31.                 Added BORDEBUG_XXX_INVALID_X constants
  32.                 Some minor parameter name changes
  33.                 Made all previous range-types DWORDs
  34.     08.04.99 HV Added the TCrackedXXX types and the CrackXXX functions to
  35.                 simplify the interpretation of the bit-encoded variable
  36.                 types TTypePointerAttr, TCompileSymbolFlags and TClassMemberAttrib
  37.     15.04.99 HV Made TBorDebugUmKind into a typed DWORD
  38.     18.04.99 HV Added missing BORDEBUG_S_OPTVAR32, BORDEBUG_S_PROCRET32 and
  39.                 BORDEBUG_S_SAVREGS32 constants.
  40.                 Made many types from 0..High(DWORD) and DWORD into Longints
  41.                 to allow for loops like: 'for Index := 0 to Count-1 do'
  42.     23.09.00 HV REAL48 renamed TREAL48 and changed from System.Real/Real48 to Double
  43.  
  44. }
  45. interface
  46.  
  47. {.$DEFINE DYNLINK_BORDEBUG}  // Remove . if you want to use HVDll for linking
  48. {$DEFINE BORDEB_EXTRAS}     // Remove DEFINE if you /don't/ want the extra functionality
  49.  
  50. {$IFNDEF WIN32}
  51.   >>> Sorry, BorDebug.DLL is designed for 32-bit platforms only! <<<
  52. {$ENDIF}
  53.  
  54. uses
  55. {$IFDEF BORDEB_EXTRAS}
  56.   SysUtils,
  57. {$ENDIF BORDEB_EXTRAS}
  58. {$IFDEF DYNLINK_BORDEBUG}
  59.   HVDll,
  60. {$ENDIF DYNLINK_BORDEBUG}
  61.   Windows
  62.   ;
  63.  
  64. // We need to have all enumerations occupy a DWORD, i.e. make them 4 bytes:
  65. {$MINENUMSIZE 4}
  66.  
  67. // The different kind of subSections these API's recognize
  68. const
  69.   BORDEBUG_SSTMODULE      = $00000120;
  70.   BORDEBUG_SSTALIGNSYM    = $00000125;
  71.   BORDEBUG_SSTSRCMODULE   = $00000127;
  72.   BORDEBUG_SSTGLOBALSYM   = $00000129;
  73.   BORDEBUG_SSTGLOBALPUB   = $0000012A; // Treated as sstGlobalSym
  74.   BORDEBUG_SSTGLOBALTYPES = $0000012B;
  75.   BORDEBUG_SSTNAMES       = $00000130;
  76.   BORDEBUG_SSTBROWSE      = $00000131;
  77.   BORDEBUG_SSTINVALID     = DWORD($FFFFFFFF);
  78.  
  79. // The different kinds of symbols
  80. const
  81.   BORDEBUG_S_COMPILE      = $00000001;
  82.   BORDEBUG_S_REGISTER     = $00000002;
  83.   BORDEBUG_S_CONST        = $00000003;
  84.   BORDEBUG_S_UDT          = $00000004;
  85.   BORDEBUG_S_SSEARCH      = $00000005;
  86.   BORDEBUG_S_END          = $00000006;
  87.   BORDEBUG_S_SKIP         = $00000007;
  88.   BORDEBUG_S_CVRESERVE    = $00000008;
  89.   BORDEBUG_S_OBJNAME      = $00000009;
  90.   BORDEBUG_S_GPROCREF     = $00000020;
  91.   BORDEBUG_S_GDATAREF     = $00000021;
  92.   BORDEBUG_S_EDATA        = $00000022;
  93.   BORDEBUG_S_EPROC        = $00000023;
  94.   BORDEBUG_S_USES         = $00000024;
  95.   BORDEBUG_S_NAMESPACE    = $00000025;
  96.   BORDEBUG_S_USING        = $00000026;
  97.   BORDEBUG_S_PCONSTANT    = $00000027;
  98.   BORDEBUG_S_BPREL32      = $00000200;
  99.   BORDEBUG_S_LDATA32      = $00000201;
  100.   BORDEBUG_S_GDATA32      = $00000202;
  101.   BORDEBUG_S_PUB32        = $00000203;
  102.   BORDEBUG_S_LPROC32      = $00000204;
  103.   BORDEBUG_S_GPROC32      = $00000205;
  104.   BORDEBUG_S_THUNK32      = $00000206;
  105.   BORDEBUG_S_BLOCK32      = $00000207;
  106.   BORDEBUG_S_WITH32       = $00000208;
  107.   BORDEBUG_S_LABEL32      = $00000209;
  108.   BORDEBUG_S_CEXMODEL32   = $0000020A;
  109.   BORDEBUG_S_VFTPATH32    = $0000020B;
  110.   BORDEBUG_S_ENTRY32      = $00000210;
  111.   BORDEBUG_S_OPTVAR32     = $00000211;
  112.   BORDEBUG_S_PROCRET32    = $00000212;
  113.   BORDEBUG_S_SAVREGS32    = $00000213;
  114.   BORDEBUG_S_SLINK32      = $00000230;
  115.   BORDEBUG_S_INVALID      = DWORD($FFFFFFFF);
  116.  
  117. // The different kind of types
  118. const
  119.   // BORDEBUG_leaf000s
  120.   BORDEBUG_LF_STARTYP     = $00000000;
  121.   BORDEBUG_LF_MODIFIER    = $00000001;
  122.   BORDEBUG_LF_POINTER     = $00000002;
  123.   BORDEBUG_LF_ARRAY       = $00000003;
  124.   BORDEBUG_LF_CLASS       = $00000004;
  125.   BORDEBUG_LF_STRUCT      = $00000005;
  126.   BORDEBUG_LF_UNION       = $00000006;
  127.   BORDEBUG_LF_ENUM        = $00000007;
  128.   BORDEBUG_LF_PROCEDURE   = $00000008;
  129.   BORDEBUG_LF_MFUNCTION   = $00000009;
  130.   BORDEBUG_LF_VTSHAPE     = $0000000A;
  131.   BORDEBUG_LF_COBOL0      = $0000000B;
  132.   BORDEBUG_LF_COBOL1      = $0000000C;
  133.   BORDEBUG_LF_BARRAY      = $0000000D;
  134.   BORDEBUG_LF_LABEL       = $0000000E;
  135.   BORDEBUG_LF_NULL        = $0000000F;
  136.   BORDEBUG_LF_NOTTRANS    = $00000010;
  137.   BORDEBUG_LF_DIMARRAY    = $00000011;
  138.   BORDEBUG_LF_VFTPATH     = $00000012;
  139.   BORDEBUG_LF_SET         = $00000030;
  140.   BORDEBUG_LF_SUBRANGE    = $00000031;
  141.   BORDEBUG_LF_PARRAY      = $00000032;
  142.   BORDEBUG_LF_PSTRING     = $00000033;
  143.   BORDEBUG_LF_CLOSURE     = $00000034;
  144.   BORDEBUG_LF_PROPERTY    = $00000035;
  145.   BORDEBUG_LF_LSTRING     = $00000036;
  146.   BORDEBUG_LF_VARIANT     = $00000037;
  147.   BORDEBUG_LF_CLASSREF    = $00000038;
  148.   BORDEBUG_LF_WSTRING     = $00000039;
  149.   BORDEBUG_LF_UNKNOWN     = $000000EF;
  150.   BORDEBUG_LF_INVALID_0   = DWORD($FFFFFFF0);
  151.  
  152. const
  153.   // BORDEBUG_leaf200s
  154.   BORDEBUG_LF_SKIP        = $00000200;
  155.   BORDEBUG_LF_ARGLIST     = $00000201;
  156.   BORDEBUG_LF_DEFARG      = $00000202;
  157.   BORDEBUG_LF_LIST        = $00000203;
  158.   BORDEBUG_LF_FIELDLIST   = $00000204;
  159.   BORDEBUG_LF_DERIVED     = $00000205;
  160.   BORDEBUG_LF_BITFIELD    = $00000206;
  161.   BORDEBUG_LF_METHODLIST  = $00000207;
  162.   BORDEBUG_LF_DIMCONU     = $00000208;
  163.   BORDEBUG_LF_DIMCONLU    = $00000209;
  164.   BORDEBUG_LF_DIMVARU     = $0000020A;
  165.   BORDEBUG_LF_DIMVARLU    = $0000020B;
  166.   BORDEBUG_LF_REFSYM      = $0000020C;
  167.   BORDEBUG_LF_INVALID_2   = DWORD($FFFFFFF2);
  168.  
  169. const
  170.   // BORDEBUG_leaf400s
  171.   BORDEBUG_LF_BCLASS      = $00000400;
  172.   BORDEBUG_LF_VBCLASS     = $00000401;
  173.   BORDEBUG_LF_IVBCLASS    = $00000402;
  174.   BORDEBUG_LF_ENUMERATE   = $00000403;
  175.   BORDEBUG_LF_FRIENDFCN   = $00000404;
  176.   BORDEBUG_LF_INDEX       = $00000405;
  177.   BORDEBUG_LF_MEMBER      = $00000406;
  178.   BORDEBUG_LF_STMEMBER    = $00000407;
  179.   BORDEBUG_LF_METHOD      = $00000408;
  180.   BORDEBUG_LF_NESTTYPE    = $00000409;
  181.   BORDEBUG_LF_VFUNCTAB    = $0000040A;
  182.   BORDEBUG_LF_FRIENDCLS   = $0000040B;
  183.   BORDEBUG_LF_INVALID_4   = DWORD($FFFFFFF4);
  184.  
  185. const
  186.   // BORDEBUG_leaf800s
  187.   BORDEBUG_LF_CHAR        = $00008000;
  188.   BORDEBUG_LF_SHORT       = $00008001;
  189.   BORDEBUG_LF_USHORT      = $00008002;
  190.   BORDEBUG_LF_LONG        = $00008003;
  191.   BORDEBUG_LF_ULONG       = $00008004;
  192.   BORDEBUG_LF_REAL32      = $00008005;
  193.   BORDEBUG_LF_REAL64      = $00008006;
  194.   BORDEBUG_LF_REAL80      = $00008007;
  195.   BORDEBUG_LF_REAL128     = $00008008;
  196.   BORDEBUG_LF_QUADWORD    = $00008009;
  197.   BORDEBUG_LF_UQUADWORD   = $0000800A;
  198.   BORDEBUG_LF_REAL48      = $0000800B;
  199.   BORDEBUG_LF_INVALID_8   = DWORD($FFFFFFF8);
  200.  
  201. const
  202.   // BORDEBUG_leaf900s
  203.   BORDEBUG_LF_RAWBITS     = $00009000;
  204.   BORDEBUG_LF_INVALID_9   = DWORD($FFFFFFF9);
  205.  
  206. // Name unmangling support
  207. const
  208.   // The kind of symbol.
  209.   BORDEBUG_UM_UNKNOWN       = $00000000;
  210.  
  211.   BORDEBUG_UM_FUNCTION      = $00000001;
  212.   BORDEBUG_UM_CONSTRUCTOR   = $00000002;
  213.   BORDEBUG_UM_DESTRUCTOR    = $00000003;
  214.   BORDEBUG_UM_OPERATOR      = $00000004;
  215.   BORDEBUG_UM_CONVERSION    = $00000005;
  216.  
  217.   BORDEBUG_UM_DATA          = $00000006;
  218.   BORDEBUG_UM_THUNK         = $00000007;
  219.   BORDEBUG_UM_TPDSC         = $00000008;
  220.   BORDEBUG_UM_VTABLE        = $00000009;
  221.   BORDEBUG_UM_VRDF_THUNK    = $0000000A;
  222.  
  223.   BORDEBUG_UM_KINDMASK      = $000000FF;
  224.  
  225.   // Modifier (is it a member; template?).
  226.   BORDEBUG_UM_QUALIFIED     = $00000100;
  227.   BORDEBUG_UM_TEMPLATE      = $00000200;
  228.  
  229.   BORDEBUG_UM_VIRDEF_FLAG   = $00000400;
  230.   BORDEBUG_UM_FRIEND_LIST   = $00000800;
  231.   BORDEBUG_UM_CTCH_HNDL_TBL = $00001000;
  232.   BORDEBUG_UM_OBJ_DEST_TBL  = $00002000;
  233.   BORDEBUG_UM_THROW_LIST    = $00004000;
  234.   BORDEBUG_UM_EXC_CTXT_TBL  = $00008000;
  235.   BORDEBUG_UM_LINKER_PROC   = $00010000;
  236.   BORDEBUG_UM_SPECMASK      = $0001FC00;
  237.  
  238.   BORDEBUG_UM_MODMASK       = $00FFFF00;
  239.  
  240.   // Some kind of error occurred.
  241.   BORDEBUG_UM_BUFOVRFLW     = $01000000;
  242.   BORDEBUG_UM_HASHTRUNC     = $02000000;
  243.   BORDEBUG_UM_ERROR         = $04000000;
  244.  
  245.   BORDEBUG_UM_ERRMASK       = $7F000000;
  246.  
  247.   // This symbol is not a mangled name.
  248.   BORDEBUG_UM_NOT_MANGLED   = $80000000;
  249.  
  250. type
  251.   TBorDebugUmKind           = type DWORD;
  252.  
  253. // Types defined specifically for the Pascal import unit to make the declarations
  254. // more self-documenting and type-safe.
  255. type
  256.   // Note: the BorDebug API uses a Double type to return the value of real48 variables
  257.   TREAL48          = Double;
  258.   QUADWORD         = Windows.LONGLONG;
  259.   // There is no unsigned Int64 in Delphi (as of D4/D5)
  260.   UQUADWORD        = Windows.LONGLONG;
  261.  
  262.   // TArrayIndex defines the maximum range of an array with 4-byte elements
  263.   TArrayIndex      = 0..(High(Integer)-$F) div SizeOf(DWORD);
  264.  
  265.   TFileOffset      = type DWORD;
  266.   PFileOffsets     = ^TFileOffsets;
  267.   TFileOffsets     = array[TArrayIndex] of TFileOffset;
  268.  
  269.   TItemCount       = type Longint;
  270.   PItemCounts      = ^TItemCounts;
  271.   TItemCounts      = array[TArrayIndex] of TItemCount;
  272.  
  273.   TSegmentIndex    = type Longint;
  274.   PSegmentIndices  = ^TSegmentIndices;
  275.   TSegmentIndices  = array[TArrayIndex] of TSegmentIndex;
  276.  
  277.   TSegmentOffset   = type DWORD;
  278.   PSegmentOffsets  = ^TSegmentOffsets;
  279.   TSegmentOffsets  = array[TArrayIndex] of TSegmentOffset;
  280.  
  281.   TLineNumber      = type DWORD;
  282.   PLineNumbers     = ^TLineNumbers;
  283.   TLineNumbers     = array[TArrayIndex] of TLineNumber;
  284.  
  285.   TNameIndex       = type Longint;
  286.   PNameIndices     = ^TNameIndices;
  287.   TNameIndices     = array[TArrayIndex] of TNameIndex;
  288.  
  289.   TRegNameIndex    = 1..High(DWORD);
  290.   PRegNameIndices  = ^TRegNameIndices;
  291.   TRegNameIndices  = array[TArrayIndex] of TRegNameIndex;
  292.  
  293.   TByteCount       = type DWORD;
  294.   PByteCounts      = ^TByteCounts;
  295.   TByteCounts      = array[TArrayIndex] of TByteCount;
  296.  
  297.   TVtblShapeDescriptor  = (vtNear, vtFar, vtThin, vtAddrDispl,
  298.                            vtMetaClassFarPointer, vtNear32, vtFar32);
  299.   PVtblShapeDescriptors = ^TVtblShapeDescriptors;
  300.   TVtblShapeDescriptors = array[TArrayIndex] of TVtblShapeDescriptor;
  301.  
  302.   TTypeIndex       = Longint; // 0..High(DWORD);
  303.   PTypeIndices     = ^TTypeIndices;
  304.   TTypeIndices     = array[TArrayIndex] of TTypeIndex;
  305.  
  306.   TByteOffset      = type DWORD;
  307.   TDebuggingStyle  = type DWORD;
  308.   TBDTimeStamp     = type DWORD;
  309.   TBitCount        = type DWORD;
  310.   TBitPosition     = 0..31;
  311.   TEBPOffset       = type LongInt;
  312.   TLinkerSegmentIndex = 1..High(DWORD);
  313.   TSourceFileIndex = type Longint;
  314.   TRangeIndex      = type Longint;
  315.   TSubSectionIndex = type Longint;
  316.   TModuleIndex     = type Longint;
  317.   TOverlayIndex    = 0..High(DWORD);
  318.   TLibraryIndex    = 0..High(DWORD);
  319.   TSubsectionType  = type DWORD; // BORDEBUG_SSTMODULE..BORDEBUG_SSTINVALID;
  320.   TConstValue      = type DWORD;
  321.   TFileOffsetDelta = type DWORD;
  322.   TSubsectionDelta = type DWORD;
  323.   TSignature       = type DWORD;
  324.   TNotUsedExternCodeFlags = type DWORD;
  325.   TExternIndex     = type DWORD;
  326.  
  327.   TRegisterIndex   = 0..High(DWORD);
  328.   TBorDebError     = (deOk, deUnknownExt, deCannotOpen, deNoDebugInfo,
  329.                       deErrorReading, deOutOfMemory);
  330.   TUDTFlag         = (udtTag, udtNested);
  331.   TUDTFlags        = set of TUDTFlag;
  332.   TSymbolFlags     = (efNormal, efTLS);
  333.   TBorDebCookie    = record end;
  334.   TBorDebHandle    = ^TBorDebCookie;
  335. const
  336.   InvalidBorDebHandle = TBorDebHandle(nil);
  337.   CodeSegmentExternal = $FFFF;
  338. type
  339.   TSymbolKind      = type DWORD; // BORDEBUG_S_COMPILE..BORDEBUG_S_INVALID;
  340.   TProcessorID     = (piIntel8080 , piIntel8086 , piIntel80286, piIntel80386,
  341.                       piIntel80486, piIntel80586, piIntel80686, piIntel80786);
  342.   TThunkOrdinal    = (toNoType, toAdjustor, toVirtualCall);
  343.   TNearFar         = (nfNear, nfRes1, nfRes2, nfRes4, nfFar);
  344.   TSaveReg         = (srEBX, srEDI, srESI, srEBP);
  345.   TSaveRegs        = set of TSaveReg;
  346.   TTypeKind        = type DWORD; // BORDEBUG_LF_STARTYP..BORDEBUG_LF_INVALID_9;
  347.   TTypeModifierAttr = (tmNone, tmConst, tmVolatile);
  348.   TTypePointerAttr = type DWORD;
  349.   TTypePointerValue1 = packed record
  350.     case integer of
  351.       // when Pointer.Mode in [pmReference, pmPointerToDataMember]:
  352.       0 : (ClassType      : TTypeIndex);
  353.       // when Pointer.TypeModifier = ptmSegmentBased:
  354.       1 : (BasedOnSegment : TSegmentIndex);
  355.       // when Pointer.TypeModifier = ptmSelfBased:
  356.       2 : (BasedOnType    : TTypeIndex);
  357.   end;
  358. const
  359.   mpDeterminedByClassType = 31;
  360.   mpSingleInheritance     = 32;
  361.   mpMultipleInheritance   = 33;
  362.   mpClassWithVirtualBases = 34;
  363. type
  364.   TMemberPointerType = type DWORD; // mpDeterminedByClassType..mpClassWithVirtualBases;
  365.   TTypePointerValue2 = packed record
  366.     case integer of
  367.       // when Pointer.Mode in [pmReference, pmPointerToDataMember]:
  368.       0 : (MemberPointerType : TMemberPointerType);
  369.       // when Pointer.TypeModifier = ptmSelfBased:
  370.       1 : (BasedOnType       : TNameIndex);
  371.   end;
  372.   TClassFlag       = (cfHasConstructor, cfHasOverloadedOperators, cfIsNested,
  373.                       cfContainsNested, cfHasOverloadedAssignment,
  374.                       cfHasCastingMethods, csIsForwardRef, csHasDestructor);
  375.   TClassFlags      = set of TClassFlag;
  376. const
  377.   ccNearC          =   0;
  378.   ccFarC           =   1;
  379.   ccNearPascal     =   2;
  380.   ccFarPascal      =   3;
  381.   ccNearFastCall   =   4;
  382.   ccFarFastCall    =   5;
  383.   ccPCode          =   6;
  384.   ccNearStdCall    =   7;
  385.   ccFarStdCall     =   8;
  386.   ccNearSysCall    =   9;
  387.   ccFarSysCall     =  10;
  388.   ccThisCall       =  11;
  389.   ccNearFastCall2  =  12;  // Same as ccNearFastall = 4
  390.   ccFastThis       = $80;
  391.   ccVarArgs        = $40;
  392.   ccLowerMask      = $3F;
  393.   ccHigherMask     = $C0;
  394. type
  395.   TCallingConvention = $00..$FF;
  396. const
  397.   Language_C        = 0;
  398.   Language_CPP      = 1;
  399.   Language_FORTRAN  = 2;
  400.   Language_TASM     = 3;
  401.   Language_Pascal   = 4;
  402.   Language_Basic    = 5;
  403.   Language_COBOL    = 6;
  404.   Language_Reserved = 255;
  405. type
  406.   TLanguageID      = Language_C..Language_Reserved;
  407.  
  408.   TCompileSymbolFlags = type DWORD;
  409.   TSegmentFlags    = (sfDataSegment, sfCodeSegment);
  410. const
  411.   PascalConstantExported = $10;
  412. type
  413.   TPascalConstantProperties = type DWORD;
  414.  
  415.   TPropertyFlag    = (pfDefault, pfReadIsName, pfWriteIsName);
  416.   TPropertyFlags   = set of TPropertyFlag;
  417.   TPropertyIndex   = type DWORD;
  418.   TFieldOffset     = type Longint;
  419.   TPropertySlot = packed record
  420.     case integer of
  421.       // When pfReadIsName or pfWriteIsName is _not_ in TPropertyFlags:
  422.       0 : (FieldOffset : TFieldOffset);
  423.       // When pfReadIsName or pfWriteIsName is in TPropertyFlags:
  424.       1 : (NameIndex   : TNameIndex);
  425.   end;
  426.   TInstanceOffset  = type DWORD;
  427.   TClassMemberAttrib = type DWORD;
  428.   PClassMemberAttribs = ^TClassMemberAttribs;
  429.   TClassMemberAttribs  = array[TArrayIndex] of TClassMemberAttrib;
  430.   TVtabOffset      = type Longint;
  431.   PVtabOffsets     = ^TVtabOffsets;
  432.   TVtabOffsets     = array[TArrayIndex] of TVtabOffset;
  433.  
  434. // Extra nice-to-have-functionality:
  435. {$IFDEF BORDEB_EXTRAS}
  436. type
  437.   TFloatPrecision  = (fpcFast, fpcANSI, fpcReserved2, fpcReserved3);
  438.   TFloatPackage    = (fpkHardware, fpkEmulator, fpkAltmath, fpkReserved3);
  439.   TAmbientAttr     = (aaNear, aaFar, aaHuge, aaRes3, aaRes4, aaRes5, aaRes6, aaRes7);
  440.   TCrackedCompileSymbolFlags = record // bits from TCompileSymbolFlags
  441.     PCodePresent   : boolean;         // : 0
  442.     FloatPrecision : TFloatPrecision; // : 1-2
  443.     FloatPackage   : TFloatPackage;   // : 3-4
  444.     AmbientData    : TAmbientAttr;    // : 5-7
  445.     AmbientCode    : TAmbientAttr;    // : 8-10
  446.     Mode32         : boolean;         // : 11
  447.     CharIsSigned   : boolean;         // : 12
  448.     Reserverd      : 0..$70000;       // : 13-31
  449.   end;
  450.  
  451.   TClassMemberProtection = (caNone, caPrivate, caProtected, caPublic);
  452.   TClassMemberProperty   = (cpVanilla, cpVirtual, cpStatic, cpFriend,
  453.                             cpIntrVirtual, cpPureVirtual, cpPureIntroVirtual,
  454.                             cpReserved7);
  455.   TCrackedClassMemberAttrib = record                // Bits in TClassMemberAttrib
  456.     ClassMemberProtection : TClassMemberProtection; // :0-1
  457.     ClassMemberProperty   : TClassMemberProperty;   // :2-4
  458.     Reserved              : 0..$8000000;            // :5-31
  459.   end;
  460.  
  461.   TPointerTypeModifier = (ptmNear, ptmFar, ptmHuge, ptmSegmentBased,
  462.                           ptmValueSegmentBased, ptmSymbolAddressBased,
  463.                           ptmSymbolSegmentBased, ptmTypeBased, ptmSelfBased,
  464.                           ptmNear32, ptmFar32, ptmReserved11, ptmReserved12,
  465.                           ptmReserved13, ptmReserved14, ptmReserved15);
  466.   TPointerMode     = (pmPointer, pmReference, pmPointerToDataMember, pmPointerToFunction,
  467.                       pmReserved4, pmReserved5, pmReserved6, pmReserved7);
  468.   TCrackedTypePointerAttr = record        // bits from TTypePointerAttr
  469.     TypeModifier  : TPointerTypeModifier; // :0-4
  470.     Mode          : TPointerMode;         // :5-7
  471.     IsFlat32      : boolean;              // :8
  472.     IsVolatile    : boolean;              // :9
  473.     IsConst       : boolean;              // :10
  474.     Reserved      : 0..$200000;           // :11-31
  475.   end;
  476.   EBorDebugError = class(Exception)
  477.   public
  478.     BorDebError: TBorDebError;
  479.     constructor CreateFromError(BorDebError: TBorDebError);
  480.   end;
  481.  
  482. function BorDebErrorToString(BorDebError: TBorDebError): string;
  483.  
  484. function CheckBorDebHandleAndError(
  485.         BorDebHandle: TBorDebHandle;
  486.         BorDebError : TBorDebError)
  487.                     : TBorDebHandle;
  488.  
  489. // Throws exception if something goes wrong:
  490. function BorDebugRegisterFileEx
  491.   (const FileName                 : string;
  492.          SkipNames                : LongBool;
  493.          CacheNames               : LongBool;
  494.          TryTDSFile               : boolean)
  495.                                   : TBorDebHandle;
  496. function CrackCompilerSymbolFlags(const Flags: TCompileSymbolFlags): TCrackedCompileSymbolFlags;
  497. function CrackClassMemberAttrib(const Attrib: TClassMemberAttrib): TCrackedClassMemberAttrib;
  498. function CrackTypePointerAttr(const Attrib: TTypePointerAttr): TCrackedTypePointerAttr;
  499.  
  500. {$ENDIF BORDEB_EXTRAS}
  501.  
  502. // Here starts the API-definition, proper:
  503.  
  504. {$IFDEF DYNLINK_BORDEBUG}
  505. var
  506.   BorDebugRegisterFile            : function
  507.   (const FileName                 : PChar;
  508.          SkipNames                : LongBool;
  509.          CacheNames               : LongBool;
  510.      var Failure                  : TBorDebError)
  511.                                   : TBorDebHandle;  cdecl;
  512.   BorDebugUnregisterFile          : procedure
  513.     (    BorDebHandle             : TBorDebHandle); cdecl;
  514.   BorDebugSubSectionDirOffset     : function
  515.     (    BorDebHandle             : TBorDebHandle)
  516.                                   : TFileOffset;    cdecl;
  517.   BorDebugSubSectionCount         : function
  518.     (    BorDebHandle             : TBorDebHandle)
  519.                                   : TItemCount;     cdecl;
  520.   BorDebugSubSection              : procedure
  521.     (    BorDebHandle             : TBorDebHandle;
  522.          SubSectionNo             : TSubSectionIndex;
  523.      var SubsectionType           : TSubsectionType;
  524.      var Module                   : TModuleIndex;
  525.      var Offset                   : TFileOffset;
  526.      var Size                     : TByteCount);   cdecl;
  527.   BorDebugModule                  : procedure
  528.     (    BorDebHandle             : TBorDebHandle;
  529.          Offset                   : TFileOffset;
  530.      var Overlay                  : TOverlayIndex;
  531.      var LibIndex                 : TLibraryIndex;
  532.      var Style                    : TDebuggingStyle;
  533.      var NameIndex                : TNameIndex;
  534.      var TimeStamp                : TBDTimeStamp;
  535.      var SegmentCount             : TItemCount);   cdecl;
  536.   BorDebugModuleSegment           : procedure
  537.     (    BorDebHandle             : TBorDebHandle;
  538.          ModuleOffset             : TFileOffset;
  539.          SegmentNo                : TSegmentIndex;
  540.      var LinkerSegment            : TLinkerSegmentIndex;
  541.      var Offset                   : TFileOffset;
  542.      var Size                     : TByteCount;
  543.      var Flags                    : TSegmentFlags);   cdecl;
  544.   BorDebugStartSymbols            : procedure
  545.     (    BorDebHandle             : TBorDebHandle;
  546.          SubSectionType           : TSubsectionType;
  547.          Offset                   : TFileOffset;
  548.          Size                     : TByteCount);   cdecl;
  549.   BorDebugNextSymbol              : procedure
  550.     (    BorDebHandle             : TBorDebHandle;
  551.      var Kind                     : TSymbolKind;
  552.      var SymOffset                : TFileOffset;
  553.      var SymLen                   : TByteCount);   cdecl;
  554.   BorDebugDumpBrowserInfo         : procedure
  555.     (    BorDebHandle             : TBorDebHandle;
  556.          BrowserOffset            : TFileOffset);   cdecl;
  557.   BorDebugSymbolCOMPILE           : procedure
  558.     (    BorDebHandle             : TBorDebHandle;
  559.          SymOffset                : TFileOffset;
  560.      var Machine                  : TProcessorID;
  561.      var Language                 : TLanguageID;
  562.      var Flags                    : TCompileSymbolFlags;
  563.          CompilerName             : PChar;
  564.          MaxNameCount             : TByteCount);   cdecl;
  565.   BorDebugSymbolREGISTER          : procedure
  566.     (    BorDebHandle             : TBorDebHandle;
  567.          SymOffset                : TFileOffset;
  568.      var TypeIndex                : TTypeIndex;
  569.      var Reg                      : TRegisterIndex;
  570.      var NameIndex                : TNameIndex;
  571.      var BrowserOffset            : TFileOffset);   cdecl;
  572.   BorDebugSymbolCONST             : procedure
  573.     (    BorDebHandle             : TBorDebHandle;
  574.          SymOffset                : TFileOffset;
  575.      var TypeIndex                : TTypeIndex;
  576.      var NameIndex                : TNameIndex;
  577.      var BrowserOffset            : TFileOffset;
  578.      var Value                    : TConstValue);   cdecl;
  579.   BorDebugSymbolUDT               : procedure
  580.     (    BorDebHandle             : TBorDebHandle;
  581.          SymOffset                : TFileOffset;
  582.      var TypeIndex                : TTypeIndex;
  583.      var Properties               : TUDTFlags;
  584.      var NameIndex                : TNameIndex;
  585.      var BrowserOffset            : TFileOffset);   cdecl;
  586.   BorDebugSymbolSSEARCH           : procedure
  587.     (    BorDebHandle             : TBorDebHandle;
  588.          SymOffset                : TFileOffset;
  589.      var FirstProcSegment         : TSegmentIndex;
  590.      var FirstProcOffset          : TSegmentOffset;
  591.      var CodeSymCount             : TItemCount;
  592.      var DataSymCount             : TItemCount;
  593.      var FirstData                : TFileOffsetDelta);   cdecl;
  594.   BorDebugSymbolOBJNAME           : procedure 
  595.     (    BorDebHandle             : TBorDebHandle;
  596.          SymOffset                : TFileOffset;
  597.      var Signature                : TSignature;
  598.      var NameIndex                : TNameIndex);   cdecl;
  599.   BorDebugSymbolGPROCREF          : procedure
  600.     (    BorDebHandle             : TBorDebHandle;
  601.          SymOffset                : TFileOffset;
  602.      var RefSymOffset             : TFileOffset;
  603.      var TypeIndex                : TTypeIndex;
  604.      var NameIndex                : TNameIndex;
  605.      var BrowserOffset            : TFileOffset;
  606.      var CodeSegment              : TSegmentIndex;
  607.      var CodeOffset               : TSegmentOffset);   cdecl;
  608.   BorDebugSymbolGDATAREF          : procedure 
  609.     (    BorDebHandle             : TBorDebHandle;
  610.          SymOffset                : TFileOffset;
  611.      var RefSymOffset             : TFileOffset;
  612.      var TypeIndex                : TTypeIndex;
  613.      var NameIndex                : TNameIndex;
  614.      var BrowserOffset            : TFileOffset;
  615.      var DataSegment              : TSegmentIndex;
  616.      var DataOffset               : TSegmentOffset);   cdecl;
  617.   BorDebugSymbolEDATA             : procedure
  618.     (    BorDebHandle             : TBorDebHandle;
  619.          SymOffset                : TFileOffset;
  620.      var TypeIndex                : TTypeIndex;
  621.      var NameIndex                : TNameIndex;
  622.      var ExternIndex              : TExternIndex;
  623.      var Flags                    : TSymbolFlags;
  624.      var BrowserOffset            : TFileOffset);   cdecl;
  625.   BorDebugSymbolEPROC             : procedure 
  626.     (    BorDebHandle             : TBorDebHandle;
  627.          SymOffset                : TFileOffset;
  628.      var TypeIndex                : TTypeIndex;
  629.      var NameIndex                : TNameIndex;
  630.      var ExternIndex              : TExternIndex;
  631.      var Flags                    : TSymbolFlags;
  632.      var BrowserOffset            : TFileOffset);   cdecl;
  633.   BorDebugSymbolUSES              : function
  634.     (    BorDebHandle             : TBorDebHandle;
  635.          SymOffset                : TFileOffset;
  636.          NameCount                : TItemCount;
  637.          NameIndices              : PNameIndices)
  638.                                   : TItemCount;    cdecl;
  639.   BorDebugSymbolNAMESPACE         : function 
  640.     (    BorDebHandle             : TBorDebHandle;
  641.          SymOffset                : TFileOffset;
  642.          UsingCount               : TItemCount;
  643.      var NameIndex                : TNameIndex;
  644.      var BrowserOffset            : TFileOffset;
  645.          UsingIndices             : PNameIndices)
  646.                                   : TItemCount;    cdecl;
  647.   BorDebugSymbolUSING             : function
  648.     (    BorDebHandle             : TBorDebHandle;
  649.          SymOffset                : TFileOffset;
  650.          NameCount                : TItemCount;
  651.          NameIndices              : PNameIndices)
  652.                                   : TItemCount;    cdecl;
  653.   BorDebugSymbolPCONSTANT         : function
  654.     (    BorDebHandle             : TBorDebHandle;
  655.          SymOffset                : TFileOffset;
  656.      var TypeIndex                : TTypeIndex;
  657.      var NameIndex                : TNameIndex;
  658.      var Properties               : TPascalConstantProperties;
  659.      var BrowserOffset            : TFileOffset;
  660.          ValueMaxLen              : TByteCount;
  661.          Value                    : PChar)
  662.                                   : TByteCount;    cdecl;
  663.   BorDebugSymbolBPREL32           : procedure 
  664.     (    BorDebHandle             : TBorDebHandle;
  665.          SymOffset                : TFileOffset;
  666.      var EBPOffset                : TEBPOffset;
  667.      var TypeIndex                : TTypeIndex;
  668.      var NameIndex                : TNameIndex;
  669.      var BrowserOffset            : TFileOffset);   cdecl;
  670.   BorDebugSymbolLDATA32           : procedure 
  671.     (    BorDebHandle             : TBorDebHandle;
  672.          SymOffset                : TFileOffset;
  673.      var Offset                   : TSegmentOffset;
  674.      var Segment                  : TSegmentIndex;
  675.      var Flags                    : TSymbolFlags;
  676.      var TypeIndex                : TTypeIndex;
  677.      var NameIndex                : TNameIndex;
  678.      var BrowserOffset            : TFileOffset);   cdecl;
  679.   BorDebugSymbolGDATA32           : procedure 
  680.     (    BorDebHandle             : TBorDebHandle;
  681.          SymOffset                : TFileOffset;
  682.      var Offset                   : TSegmentOffset;
  683.      var Segment                  : TSegmentIndex;
  684.      var Flags                    : TSymbolFlags;
  685.      var TypeIndex                : TTypeIndex;
  686.      var NameIndex                : TNameIndex;
  687.      var BrowserOffset            : TFileOffset);   cdecl;
  688.   BorDebugSymbolPUB32             : procedure 
  689.     (    BorDebHandle             : TBorDebHandle;
  690.          SymOffset                : TFileOffset;
  691.      var Offset                   : TSegmentOffset;
  692.      var Segment                  : TSegmentIndex;
  693.      var Flags                    : TSymbolFlags;
  694.      var TypeIndex                : TTypeIndex;
  695.      var NameIndex                : TNameIndex;
  696.      var BrowserOffset            : TFileOffset);   cdecl;
  697.   BorDebugSymbolLPROC32           : procedure
  698.     (    BorDebHandle             : TBorDebHandle;
  699.          SymOffset                : TFileOffset;
  700.      var Parent                   : TSubsectionDelta;
  701.      var End_                     : TSubsectionDelta;
  702.      var Next                     : TSubsectionDelta;
  703.      var CodeLength               : TByteCount;
  704.      var DebugStart               : TFileOffset;
  705.      var DebugEnd                 : TFileOffset;
  706.      var Offset                   : TSegmentOffset;
  707.      var Segment                  : TSegmentIndex;
  708.      var Flags                    : DWORD;
  709.      var TypeIndex                : TTypeIndex;
  710.      var NameIndex                : TNameIndex;
  711.      var BrowserOffset            : TFileOffset);   cdecl;
  712.   BorDebugSymbolGPROC32           : function
  713.     (    BorDebHandle             : TBorDebHandle;
  714.          SymOffset                : TFileOffset;
  715.      var Parent                   : TSubsectionDelta;
  716.      var End_                     : TSubsectionDelta;
  717.      var Next                     : TSubsectionDelta;
  718.      var CodeLength               : TByteCount;
  719.      var DebugStart               : TFileOffset;
  720.      var DebugEnd                 : TFileOffset;
  721.      var Offset                   : TSegmentOffset;
  722.      var Segment                  : TSegmentIndex;
  723.      var Flags                    : DWORD;
  724.      var TypeIndex                : TTypeIndex;
  725.      var NameIndex                : TNameIndex;
  726.      var BrowserOffset            : TFileOffset;
  727.          LinkName                 : PChar;
  728.          MaxLinkName              : TByteCount)
  729.                                   : TByteCount;    cdecl;
  730.   BorDebugSymbolTHUNK32           : procedure 
  731.     (    BorDebHandle             : TBorDebHandle;
  732.          SymOffset                : TFileOffset;
  733.      var Parent                   : TSubsectionDelta;
  734.      var End_                     : TSubsectionDelta;
  735.      var Next                     : TSubsectionDelta;
  736.      var Offset                   : TSegmentOffset;
  737.      var Segment                  : TSegmentIndex;
  738.      var CodeLength               : TByteCount;
  739.      var Ordinal                  : TThunkOrdinal;
  740.      var NameIndex                : TNameIndex;
  741.      var Delta                    : TByteCount);   cdecl;
  742.   BorDebugSymbolBLOCK32           : procedure
  743.     (    BorDebHandle             : TBorDebHandle;
  744.          SymOffset                : TFileOffset;
  745.      var Parent                   : TSubsectionDelta;
  746.      var End_                     : TSubsectionDelta;
  747.      var CodeLength               : TByteCount;
  748.      var Offset                   : TSegmentOffset;
  749.      var Segment                  : TSegmentIndex;
  750.      var NameIndex                : TNameIndex);   cdecl;
  751.   BorDebugSymbolWITH32            : procedure
  752.     (    BorDebHandle             : TBorDebHandle;
  753.          SymOffset                : TFileOffset;
  754.      var Parent                   : TSubsectionDelta;
  755.      var CodeLength               : TByteCount;
  756.      var Offset                   : TSegmentOffset;
  757.      var Segment                  : TSegmentIndex;
  758.      var Flags                    : DWORD;
  759.      var TypeIndex                : TTypeIndex;
  760.      var NameIndex                : TNameIndex;
  761.      var VarOffset                : TByteOffset);   cdecl;
  762.   BorDebugSymbolLABEL32           : procedure 
  763.     (    BorDebHandle             : TBorDebHandle;
  764.          SymOffset                : TFileOffset;
  765.      var Offset                   : TSegmentOffset;
  766.      var Segment                  : TSegmentIndex;
  767.      var NearFar                  : TNearFar;
  768.      var NameIndex                : TNameIndex);  cdecl;
  769.   BorDebugSymbolENTRY32           : procedure 
  770.     (    BorDebHandle             : TBorDebHandle;
  771.          SymOffset                : TFileOffset;
  772.      var Offset                   : TSegmentOffset;
  773.      var Segment                  : TSegmentIndex);  cdecl;
  774.   BorDebugSymbolOPTVAR32          : function 
  775.     (    BorDebHandle             : TBorDebHandle;
  776.          SymOffset                : TFileOffset;
  777.          MaxEntries               : TItemCount;
  778.          StartEntries             : PSegmentOffsets;  // or nil
  779.          LengthEntries            : PByteCounts;      // or nil
  780.          RegNameEntries           : PRegNameIndices)  // or nil
  781.                                   : TItemCount;   cdecl;
  782.   BorDebugSymbolPROCRET32         : procedure
  783.     (    BorDebHandle             : TBorDebHandle;
  784.          SymOffset                : TFileOffset;
  785.      var Offset                   : TSegmentOffset;
  786.      var Length                   : TByteCount);  cdecl;
  787.   BorDebugSymbolSAVREGS32         : procedure 
  788.     (    BorDebHandle             : TBorDebHandle;
  789.          SymOffset                : TFileOffset;
  790.      var Mask                     : TSaveRegs;
  791.      var EBPOffset                : TEBPOffset);  cdecl;
  792.   BorDebugSymbolSLINK32           : function 
  793.     (    BorDebHandle             : TBorDebHandle;
  794.          SymOffset                : TFileOffset): TEBPOffset;   cdecl;
  795.   BorDebugSrcModule               : procedure
  796.     (    BorDebHandle             : TBorDebHandle;
  797.          Offset                   : TFileOffset;
  798.      var RangeCount               : TItemCount;
  799.      var SourceCount              : TItemCount);  cdecl;
  800.   BorDebugSrcModuleRanges         : procedure 
  801.     (    BorDebHandle             : TBorDebHandle;
  802.          Offset                   : TFileOffset;
  803.          Segments                 : PSegmentIndices;
  804.          SegmentStarts            : PSegmentOffsets;
  805.          SegmentEnds              : PSegmentOffsets);  cdecl;
  806.   BorDebugSrcModuleSources        : procedure
  807.     (    BorDebHandle             : TBorDebHandle;
  808.          Offset                   : TFileOffset;
  809.          SourceOffsets            : PFileOffsets;
  810.          Names                    : PNameIndices;
  811.          RangeCounts              : PItemCounts);  cdecl;
  812.   BorDebugSrcModuleSourceRanges   : procedure
  813.     (    BorDebHandle             : TBorDebHandle;
  814.          Offset                   : TFileOffset;
  815.          Source                   : TSourceFileIndex;
  816.          Segments                 : PSegmentIndices;
  817.          SegmentStarts            : PSegmentOffsets;
  818.          SegmentEnds              : PSegmentOffsets;
  819.          LineNumberCounts         : PItemCounts);  cdecl;
  820.   BorDebugSrcModuleLineNumbers    : procedure 
  821.     (    BorDebHandle             : TBorDebHandle;
  822.          Offset                   : TFileOffset;
  823.          Source                   : TSourceFileIndex;
  824.          Range                    : TRangeIndex;
  825.          LineNumbers              : PLineNumbers;
  826.          LineOffsets              : PSegmentOffsets);  cdecl;
  827.   BorDebugGlobalSym               : procedure
  828.     (    BorDebHandle             : TBorDebHandle;
  829.          Offset                   : TFileOffset;
  830.      var SymHashFunction          : TNameIndex;
  831.      var AddrHashFunction         : TNameIndex;
  832.      var SymTableBytes            : TByteCount;
  833.      var SymHashTableBytes        : TByteCount;
  834.      var AddrHashTableBytes       : TByteCount;
  835.      var TotalUDTs                : TItemCount;
  836.      var TotalOtherSyms           : TItemCount;
  837.      var TotalSymbols             : TItemCount;
  838.      var TotalNameSpaces          : TItemCount);  cdecl;
  839.   BorDebugGlobalTypes             : procedure
  840.     (    BorDebHandle             : TBorDebHandle;
  841.      var Signature                : TSignature;
  842.      var TotalTypes               : TItemCount);  cdecl;
  843.   BorDebugTypeFromIndex           : procedure
  844.     (    BorDebHandle             : TBorDebHandle;
  845.          TypeIndex                : TTypeIndex;
  846.      var TypeOffset               : TFileOffset;
  847.      var Length                   : TByteCount;
  848.      var TypeKind                 : TTypeKind);  cdecl;
  849.   BorDebugTypeFromOffset          : procedure
  850.     (    BorDebHandle             : TBorDebHandle;
  851.          TypeOffset               : TFileOffset;
  852.      var Length                   : TByteCount;
  853.      var TypeKind                 : TTypeKind);  cdecl;
  854.   BorDebugTypeMODIFIER            : procedure
  855.     (    BorDebHandle             : TBorDebHandle;
  856.          TypeOffset               : TFileOffset;
  857.      var Attributes               : TTypeModifierAttr;
  858.      var TypeIndex                : TTypeIndex);  cdecl;
  859.   BorDebugTypePOINTER             : procedure
  860.     (    BorDebHandle             : TBorDebHandle;
  861.          TypeOffset               : TFileOffset;
  862.      var Attributes               : TTypePointerAttr;
  863.      var TypeIndex                : TTypeIndex;
  864.      var Value1                   : TTypePointerValue1;
  865.      var Value2                   : TTypePointerValue2);  cdecl;
  866.   BorDebugTypeARRAY               : procedure
  867.     (    BorDebHandle             : TBorDebHandle;
  868.          TypeOffset               : TFileOffset;
  869.      var ElementType              : TTypeIndex;
  870.      var IndexType                : TTypeIndex;
  871.      var NameIndex                : TNameIndex;
  872.      var Size                     : TByteCount;
  873.      var Elements                 : TItemCount);  cdecl;
  874.   BorDebugTypeCLASS               : procedure
  875.     (    BorDebHandle             : TBorDebHandle;
  876.          TypeOffset               : TFileOffset;
  877.      var FieldCount               : TItemCount;
  878.      var FieldList                : TTypeIndex;
  879.      var ClassFlags               : TClassFlags;
  880.      var ContainingClass          : TTypeIndex;
  881.      var DerivationList           : TTypeIndex;
  882.      var Vtable                   : TTypeIndex;
  883.      var NameIndex                : TNameIndex;
  884.      var ClassSize                : TByteCount);  cdecl;
  885.   BorDebugTypeUNION               : procedure
  886.     (    BorDebHandle             : TBorDebHandle;
  887.          TypeOffset               : TFileOffset;
  888.      var FieldCount               : TItemCount;
  889.      var FieldList                : TTypeIndex;
  890.      var ClassFlags               : TClassFlags;
  891.      var ContainingClass          : TTypeIndex;
  892.      var NameIndex                : TNameIndex;
  893.      var ClassSize                : TByteCount);  cdecl;
  894.   BorDebugTypeENUM                : procedure
  895.     (    BorDebHandle             : TBorDebHandle;
  896.          TypeOffset               : TFileOffset;
  897.      var MemberCount              : TItemCount;
  898.      var UnderlyingType           : TTypeIndex;
  899.      var MemberList               : TTypeIndex;
  900.      var ContainingClass          : TTypeIndex;
  901.      var NameIndex                : TNameIndex);  cdecl;
  902.   BorDebugTypePROCEDURE           : procedure
  903.     (    BorDebHandle             : TBorDebHandle;
  904.          TypeOffset               : TFileOffset;
  905.      var ReturnType               : TTypeIndex;
  906.      var CallingConvention        : TCallingConvention;
  907.      var ArgCount                 : TItemCount;
  908.      var ArgList                  : TTypeIndex);  cdecl;
  909.   BorDebugTypeMFUNCTION           : procedure
  910.     (    BorDebHandle             : TBorDebHandle;
  911.          TypeOffset               : TFileOffset;
  912.      var ReturnType               : TTypeIndex;
  913.      var ClassType                : TTypeIndex;
  914.      var ThisType                 : TTypeIndex;
  915.      var CallingConvention        : TCallingConvention;
  916.      var ArgCount                 : TItemCount;
  917.      var ArgList                  : TTypeIndex;
  918.      var ThisAdjust               : TSegmentOffset {?});  cdecl;
  919.   BorDebugTypeVTSHAPE             : function
  920.     (    BorDebHandle             : TBorDebHandle;
  921.          TypeOffset               : TFileOffset;
  922.          MaxCount                 : TItemCount;
  923.          DescriptorArray          : PVtblShapeDescriptors)
  924.                                   : TItemCount;   cdecl;
  925.   BorDebugTypeLABEL               : function
  926.     (    BorDebHandle             : TBorDebHandle;
  927.          TypeOffset               : TFileOffset)
  928.                                   : TNearFar;   cdecl;
  929.   BorDebugTypeSET                 : procedure
  930.     (    BorDebHandle             : TBorDebHandle;
  931.          TypeOffset               : TFileOffset;
  932.      var ElemType                 : TTypeIndex;
  933.      var NameIndex                : TNameIndex;
  934.      var LowByte                  : DWORD;
  935.      var Length                   : TItemCount);  cdecl;
  936.   BorDebugTypeSUBRANGE            : procedure
  937.     (    BorDebHandle             : TBorDebHandle;
  938.          TypeOffset               : TFileOffset;
  939.      var BaseType                 : TTypeIndex;
  940.      var NameIndex                : TNameIndex;
  941.      var LoBound                  : DWORD;
  942.      var HiBound                  : DWORD;
  943.      var Size                     : TByteCount);  cdecl;
  944.   BorDebugTypePARRAY              : procedure
  945.     (    BorDebHandle             : TBorDebHandle;
  946.          TypeOffset               : TFileOffset;
  947.      var ElementType              : TTypeIndex;
  948.      var IndexType                : TTypeIndex;
  949.      var NameIndex                : TNameIndex;
  950.      var Size                     : TByteCount;
  951.      var Elements                 : TItemCount);  cdecl;
  952.   BorDebugTypePSTRING             : procedure
  953.     (    BorDebHandle             : TBorDebHandle;
  954.          TypeOffset               : TFileOffset;
  955.      var ElemType                 : TTypeIndex;
  956.      var IndexType                : TTypeIndex;
  957.      var NameIndex                : TNameIndex);  cdecl;
  958.   BorDebugTypeCLOSURE             : procedure
  959.     (    BorDebHandle             : TBorDebHandle;
  960.          TypeOffset               : TFileOffset;
  961.      var ReturnType               : TTypeIndex;
  962.      var CallingConvention        : TCallingConvention;
  963.      var ArgCount                 : TItemCount;
  964.      var ArgList                  : TTypeIndex);  cdecl;
  965.   BorDebugTypePROPERTY            : procedure
  966.     (    BorDebHandle             : TBorDebHandle;
  967.          TypeOffset               : TFileOffset;
  968.      var TypeIndex                : TTypeIndex;
  969.      var Flags                    : TPropertyFlags;
  970.      var ArrayIndex               : TTypeIndex;
  971.      var PropIndex                : TPropertyIndex;
  972.      var ReadSlot                 : TPropertySlot;
  973.      var WriteSlot                : TPropertySlot);  cdecl;
  974.   BorDebugTypeLSTRING             : function
  975.     (    BorDebHandle             : TBorDebHandle;
  976.          TypeOffset               : TFileOffset)
  977.                                   : TNameIndex;   cdecl;
  978.   BorDebugTypeVARIANT             : function
  979.     (    BorDebHandle             : TBorDebHandle;
  980.          TypeOffset               : TFileOffset)
  981.                                   : TNameIndex;   cdecl;
  982.   BorDebugTypeCLASSREF            : procedure
  983.     (    BorDebHandle             : TBorDebHandle;
  984.          TypeOffset               : TFileOffset;
  985.      var RefType                  : TTypeIndex;
  986.      var VtShape                  : TTypeIndex);  cdecl;
  987.   BorDebugTypeWSTRING             : function
  988.     (    BorDebHandle             : TBorDebHandle;
  989.          TypeOffset               : TFileOffset)
  990.                                   : TNameIndex;   cdecl;
  991.   BorDebugTypeARGLIST             : function
  992.     (    BorDebHandle             : TBorDebHandle;
  993.          TypeOffset               : TFileOffset;
  994.          MaxTypes                 : TItemCount;
  995.          TypeArray                : PTypeIndices)
  996.                                   : TItemCount;   cdecl;
  997.   BorDebugTypeStartFIELDLIST      : procedure
  998.     (    BorDebHandle             : TBorDebHandle;
  999.          TypeOffset               : TFileOffset);  cdecl;
  1000.   BorDebugTypeNextFIELDLIST       : procedure
  1001.     (    BorDebHandle             : TBorDebHandle;
  1002.      var Kind                     : TTypeKind;
  1003.      var Offset                   : TFileOffset);  cdecl;
  1004.   BorDebugTypeDERIVED             : function
  1005.     (    BorDebHandle             : TBorDebHandle;
  1006.          TypeOffset               : TFileOffset;
  1007.          MaxTypes                 : TItemCount;
  1008.          DerivedTypes             : PTypeIndices)
  1009.                                   : TItemCount;   cdecl;
  1010.   BorDebugTypeBITFIELD            : procedure
  1011.     (    BorDebHandle             : TBorDebHandle;
  1012.          TypeOffset               : TFileOffset;
  1013.      var Length                   : TBitCount;
  1014.      var Position                 : TBitPosition;
  1015.      var TypeIndex                : TTypeIndex);  cdecl;
  1016.   BorDebugTypeMETHODLIST          : function
  1017.     (    BorDebHandle             : TBorDebHandle;
  1018.          TypeOffset               : TFileOffset;
  1019.          MaxMethods               : TItemCount;
  1020.          TypeArray                : PTypeIndices;
  1021.          AttribArray              : PClassMemberAttribs;
  1022.          BrowserArray             : PFileOffsets;
  1023.          VtabOffArray             : PVtabOffsets)
  1024.                                   : TItemCount;   cdecl;
  1025.   BorDebugTypeBCLASS              : procedure
  1026.     (    BorDebHandle             : TBorDebHandle;
  1027.          TypeOffset               : TFileOffset;
  1028.      var BaseType                 : TTypeIndex;
  1029.      var Attrib                   : TClassMemberAttrib;
  1030.      var Offset                   : TVtabOffset);  cdecl;
  1031.   BorDebugTypeVBCLASS             : procedure
  1032.     (    BorDebHandle             : TBorDebHandle;
  1033.          TypeOffset               : TFileOffset;
  1034.      var vbType                   : TTypeIndex;
  1035.      var vbpType                  : TTypeIndex;
  1036.      var Attrib                   : TClassMemberAttrib;
  1037.      var VbpOffset                : TVtabOffset;
  1038.      var Offset                   : TVtabOffset);  cdecl;
  1039.   BorDebugTypeIVBCLASS            : procedure
  1040.     (    BorDebHandle             : TBorDebHandle;
  1041.          TypeOffset               : TFileOffset;
  1042.      var vbType                   : TTypeIndex;
  1043.      var vbpType                  : TTypeIndex;
  1044.      var Attrib                   : TClassMemberAttrib;
  1045.      var VbpOffset                : TVtabOffset;
  1046.      var Offset                   : TVtabOffset);  cdecl;
  1047.   BorDebugTypeENUMERATE           : procedure
  1048.     (    BorDebHandle             : TBorDebHandle;
  1049.          TypeOffset               : TFileOffset;
  1050.      var Attrib                   : DWORD;
  1051.      var NameIndex                : TNameIndex;
  1052.      var BrowserOffset            : TFileOffset;
  1053.      var Value                    : DWORD);  cdecl;
  1054.   BorDebugTypeFRIENDFCN           : procedure 
  1055.     (    BorDebHandle             : TBorDebHandle;
  1056.          TypeOffset               : TFileOffset;
  1057.      var TypeIndex                : TTypeIndex;
  1058.      var NameIndex                : TNameIndex);  cdecl;
  1059.   BorDebugTypeINDEX               : function
  1060.     (    BorDebHandle             : TBorDebHandle;
  1061.          TypeOffset               : TFileOffset)
  1062.                                   : TTypeIndex;   cdecl;
  1063.   BorDebugTypeMEMBER              : procedure 
  1064.     (    BorDebHandle             : TBorDebHandle;
  1065.          TypeOffset               : TFileOffset;
  1066.      var TypeIndex                : TTypeIndex;
  1067.      var Attrib                   : TClassMemberAttrib;
  1068.      var NameIndex                : TNameIndex;
  1069.      var Offset                   : TInstanceOffset;
  1070.      var BrowserOffset            : TFileOffset);  cdecl;
  1071.   BorDebugTypeSTMEMBER            : procedure
  1072.     (    BorDebHandle             : TBorDebHandle;
  1073.          TypeOffset               : TFileOffset;
  1074.      var TypeIndex                : TTypeIndex;
  1075.      var Attrib                   : TClassMemberAttrib;
  1076.      var NameIndex                : TNameIndex;
  1077.      var BrowserOffset            : TFileOffset);  cdecl;
  1078.   BorDebugTypeMETHOD              : procedure 
  1079.     (    BorDebHandle             : TBorDebHandle;
  1080.          TypeOffset               : TFileOffset;
  1081.      var OverloadedCount          : TItemCount;
  1082.      var MethodList               : TTypeIndex;
  1083.      var NameIndex                : TNameIndex);  cdecl;
  1084.   BorDebugTypeNESTTYPE            : procedure 
  1085.     (    BorDebHandle             : TBorDebHandle;
  1086.          TypeOffset               : TFileOffset;
  1087.      var TypeIndex                : TTypeIndex;
  1088.      var NameIndex                : TNameIndex;
  1089.      var BrowserOffset            : TFileOffset);  cdecl;
  1090.   BorDebugTypeVFUNCTAB            : procedure
  1091.     (    BorDebHandle             : TBorDebHandle;
  1092.          TypeOffset               : TFileOffset;
  1093.      var TypeIndex                : TTypeIndex;
  1094.      var Offset                   : TVtabOffset);  cdecl;
  1095.   BorDebugTypeFRIENDCLS           : function 
  1096.     (    BorDebHandle             : TBorDebHandle;
  1097.          TypeOffset               : TFileOffset)
  1098.                                   : TTypeIndex;   cdecl;
  1099.   BorDebugTypeCHAR                : function 
  1100.     (    BorDebHandle             : TBorDebHandle;
  1101.          TypeOffset               : TFileOffset)
  1102.                                   : Char;    cdecl;
  1103.   BorDebugTypeSHORT               : function 
  1104.     (    BorDebHandle             : TBorDebHandle;
  1105.          TypeOffset               : TFileOffset)
  1106.                                   : SmallInt;cdecl;
  1107.   BorDebugTypeUSHORT              : function
  1108.     (    BorDebHandle             : TBorDebHandle;
  1109.          TypeOffset               : TFileOffset)
  1110.                                   : DWORD;   cdecl;
  1111.   BorDebugTypeLONG                : function
  1112.     (    BorDebHandle             : TBorDebHandle;
  1113.          TypeOffset               : TFileOffset)
  1114.                                   : LongInt; cdecl;
  1115.   BorDebugTypeULONG               : function
  1116.     (    BorDebHandle             : TBorDebHandle;
  1117.          TypeOffset               : TFileOffset)
  1118.                                   : DWORD;   cdecl;
  1119.   BorDebugTypeREAL32              : function
  1120.     (    BorDebHandle             : TBorDebHandle;
  1121.          TypeOffset               : TFileOffset)
  1122.                                   : Single;  cdecl;
  1123.   BorDebugTypeREAL64              : function
  1124.     (    BorDebHandle             : TBorDebHandle;
  1125.          TypeOffset               : TFileOffset)
  1126.                                   : Double;  cdecl;
  1127.   BorDebugTypeREAL80              : function
  1128.     (    BorDebHandle             : TBorDebHandle;
  1129.          TypeOffset               : TFileOffset)
  1130.                                   : Extended;cdecl;
  1131.   BorDebugTypeQUADWORD            : function
  1132.     (    BorDebHandle             : TBorDebHandle;
  1133.          TypeOffset               : TFileOffset)
  1134.                                   : QUADWORD;cdecl;
  1135.   BorDebugTypeUQUADWORD           : function
  1136.     (    BorDebHandle             : TBorDebHandle;
  1137.          TypeOffset               : TFileOffset)
  1138.                                   : UQUADWORD;cdecl;
  1139.   BorDebugTypeREAL48              : function
  1140.     (    BorDebHandle             : TBorDebHandle;
  1141.          TypeOffset               : TFileOffset)
  1142.                                   : TREAL48;  cdecl;
  1143.   BorDebugNamesTotalNames         : function
  1144.     (    BorDebHandle             : TBorDebHandle)
  1145.                                   : TItemCount;   cdecl;
  1146.   BorDebugNameIndexToUnmangledName: procedure
  1147.     (    BorDebHandle             : TBorDebHandle;
  1148.          NameIndex                : TNameIndex;
  1149.          Buf                      : PChar;
  1150.          BufLen                   : TByteCount);  cdecl;
  1151.   BorDebugNameIndexToName         : procedure
  1152.     (    BorDebHandle             : TBorDebHandle;
  1153.          NameIndex                : TNameIndex;
  1154.          Buf                      : PChar;
  1155.          BufLen                   : TByteCount);  cdecl;
  1156.   BorDebugRegIndexToName          : procedure
  1157.     (    BorDebHandle             : TBorDebHandle;
  1158.          Reg                      : TRegNameIndex;
  1159.          Buf                      : PChar;
  1160.          BufLen                   : TByteCount);  cdecl;
  1161.   BorDebugTypeIndexToString       : procedure
  1162.     (    BorDebHandle             : TBorDebHandle;
  1163.          TypeIndex                : TTypeIndex;
  1164.          Buf                      : PChar;
  1165.          BufLen                   : TByteCount);  cdecl;
  1166.   BorDebugUnmangle                : function
  1167.     (    Src                      : PChar;
  1168.          Dest                     : PChar;
  1169.          MaxLen                   : TByteCount;
  1170.          QualP                    : PChar;  // or nil
  1171.          BaseP                    : PChar;  // or nil
  1172.          DoArgs                   : LongBool)
  1173.                                   : TBorDebugUmKind; cdecl;
  1174. var
  1175.   BorDebugDLL: TDll;  // See HVDll and Delphi Magazine on how to use this
  1176. {$ELSE}
  1177.   function BorDebugRegisterFile
  1178.   (const FileName                 : PChar;
  1179.          SkipNames                : LongBool;
  1180.          CacheNames               : LongBool;
  1181.      var Failure                  : TBorDebError)
  1182.                                   : TBorDebHandle;  cdecl;
  1183.   procedure BorDebugUnregisterFile
  1184.     (    BorDebHandle             : TBorDebHandle); cdecl;
  1185.   function BorDebugSubSectionDirOffset
  1186.     (    BorDebHandle             : TBorDebHandle)
  1187.                                   : TFileOffset;    cdecl;
  1188.   function BorDebugSubSectionCount
  1189.     (    BorDebHandle             : TBorDebHandle)
  1190.                                   : TItemCount;     cdecl;
  1191.   procedure BorDebugSubSection
  1192.     (    BorDebHandle             : TBorDebHandle;
  1193.          SubSectionNo             : TSubSectionIndex;
  1194.      var SubsectionType           : TSubsectionType;
  1195.      var Module                   : TModuleIndex;
  1196.      var Offset                   : TFileOffset;
  1197.      var Size                     : TByteCount);   cdecl;
  1198.   procedure BorDebugModule
  1199.     (    BorDebHandle             : TBorDebHandle;
  1200.          Offset                   : TFileOffset;
  1201.      var Overlay                  : TOverlayIndex;
  1202.      var LibIndex                 : TLibraryIndex;
  1203.      var Style                    : TDebuggingStyle;
  1204.      var NameIndex                : TNameIndex;
  1205.      var TimeStamp                : TBDTimeStamp;
  1206.      var SegmentCount             : TItemCount);   cdecl;
  1207.   procedure BorDebugModuleSegment
  1208.     (    BorDebHandle             : TBorDebHandle;
  1209.          ModuleOffset             : TFileOffset;
  1210.          SegmentNo                : TSegmentIndex;
  1211.      var LinkerSegment            : TLinkerSegmentIndex;
  1212.      var Offset                   : TFileOffset;
  1213.      var Size                     : TByteCount;
  1214.      var Flags                    : TSegmentFlags);   cdecl;
  1215.   procedure BorDebugStartSymbols
  1216.     (    BorDebHandle             : TBorDebHandle;
  1217.          SubSectionType           : TSubsectionType;
  1218.          Offset                   : TFileOffset;
  1219.          Size                     : TByteCount);   cdecl;
  1220.   procedure BorDebugNextSymbol
  1221.     (    BorDebHandle             : TBorDebHandle;
  1222.      var Kind                     : TSymbolKind;
  1223.      var SymOffset                : TFileOffset;
  1224.      var SymLen                   : TByteCount);   cdecl;
  1225.   procedure BorDebugDumpBrowserInfo
  1226.     (    BorDebHandle             : TBorDebHandle;
  1227.          BrowserOffset            : TFileOffset);   cdecl;
  1228.   procedure BorDebugSymbolCOMPILE
  1229.     (    BorDebHandle             : TBorDebHandle;
  1230.          SymOffset                : TFileOffset;
  1231.      var Machine                  : TProcessorID;
  1232.      var Language                 : TLanguageID;
  1233.      var Flags                    : TCompileSymbolFlags;
  1234.          CompilerName             : PChar;
  1235.          MaxNameCount             : TByteCount);   cdecl;
  1236.   procedure BorDebugSymbolREGISTER
  1237.     (    BorDebHandle             : TBorDebHandle;
  1238.          SymOffset                : TFileOffset;
  1239.      var TypeIndex                : TTypeIndex;
  1240.      var Reg                      : TRegisterIndex;
  1241.      var NameIndex                : TNameIndex;
  1242.      var BrowserOffset            : TFileOffset);   cdecl;
  1243.   procedure BorDebugSymbolCONST
  1244.     (    BorDebHandle             : TBorDebHandle;
  1245.          SymOffset                : TFileOffset;
  1246.      var TypeIndex                : TTypeIndex;
  1247.      var NameIndex                : TNameIndex;
  1248.      var BrowserOffset            : TFileOffset;
  1249.      var Value                    : TConstValue);   cdecl;
  1250.   procedure BorDebugSymbolUDT
  1251.     (    BorDebHandle             : TBorDebHandle;
  1252.          SymOffset                : TFileOffset;
  1253.      var TypeIndex                : TTypeIndex;
  1254.      var Properties               : TUDTFlags;
  1255.      var NameIndex                : TNameIndex;
  1256.      var BrowserOffset            : TFileOffset);   cdecl;
  1257.   procedure BorDebugSymbolSSEARCH
  1258.     (    BorDebHandle             : TBorDebHandle;
  1259.          SymOffset                : TFileOffset;
  1260.      var FirstProcSegment         : TSegmentIndex;
  1261.      var FirstProcOffset          : TSegmentOffset;
  1262.      var CodeSymCount             : TItemCount;
  1263.      var DataSymCount             : TItemCount;
  1264.      var FirstData                : TFileOffsetDelta);   cdecl;
  1265.   procedure BorDebugSymbolOBJNAME
  1266.     (    BorDebHandle             : TBorDebHandle;
  1267.          SymOffset                : TFileOffset;
  1268.      var Signature                : TSignature;
  1269.      var NameIndex                : TNameIndex);   cdecl;
  1270.   procedure BorDebugSymbolGPROCREF
  1271.     (    BorDebHandle             : TBorDebHandle;
  1272.          SymOffset                : TFileOffset;
  1273.      var RefSymOffset             : TFileOffset;
  1274.      var TypeIndex                : TTypeIndex;
  1275.      var NameIndex                : TNameIndex;
  1276.      var BrowserOffset            : TFileOffset;
  1277.      var CodeSegment              : TSegmentIndex;
  1278.      var CodeOffset               : TSegmentOffset);   cdecl;
  1279.   procedure BorDebugSymbolGDATAREF
  1280.     (    BorDebHandle             : TBorDebHandle;
  1281.          SymOffset                : TFileOffset;
  1282.      var RefSymOffset             : TFileOffset;
  1283.      var TypeIndex                : TTypeIndex;
  1284.      var NameIndex                : TNameIndex;
  1285.      var BrowserOffset            : TFileOffset;
  1286.      var DataSegment              : TSegmentIndex;
  1287.      var DataOffset               : TSegmentOffset);   cdecl;
  1288.   procedure BorDebugSymbolEDATA
  1289.     (    BorDebHandle             : TBorDebHandle;
  1290.          SymOffset                : TFileOffset;
  1291.      var TypeIndex                : TTypeIndex;
  1292.      var NameIndex                : TNameIndex;
  1293.      var ExternIndex              : TExternIndex;
  1294.      var Flags                    : TSymbolFlags;
  1295.      var BrowserOffset            : TFileOffset);   cdecl;
  1296.   procedure BorDebugSymbolEPROC
  1297.     (    BorDebHandle             : TBorDebHandle;
  1298.          SymOffset                : TFileOffset;
  1299.      var TypeIndex                : TTypeIndex;
  1300.      var NameIndex                : TNameIndex;
  1301.      var ExternIndex              : TExternIndex;
  1302.      var Flags                    : TSymbolFlags;
  1303.      var BrowserOffset            : TFileOffset);   cdecl;
  1304.   function BorDebugSymbolUSES
  1305.     (    BorDebHandle             : TBorDebHandle;
  1306.          SymOffset                : TFileOffset;
  1307.          NameCount                : TItemCount;
  1308.          NameIndices              : PNameIndices)
  1309.                                   : TItemCount;    cdecl;
  1310.   function BorDebugSymbolNAMESPACE
  1311.     (    BorDebHandle             : TBorDebHandle;
  1312.          SymOffset                : TFileOffset;
  1313.          UsingCount               : TItemCount;
  1314.      var NameIndex                : TNameIndex;
  1315.      var BrowserOffset            : TFileOffset;
  1316.          UsingIndices             : PNameIndices)
  1317.                                   : TItemCount;    cdecl;
  1318.   function BorDebugSymbolUSING
  1319.     (    BorDebHandle             : TBorDebHandle;
  1320.          SymOffset                : TFileOffset;
  1321.          NameCount                : TItemCount;
  1322.          NameIndices              : PNameIndices)
  1323.                                   : TItemCount;    cdecl;
  1324.   function BorDebugSymbolPCONSTANT
  1325.     (    BorDebHandle             : TBorDebHandle;
  1326.          SymOffset                : TFileOffset;
  1327.      var TypeIndex                : TTypeIndex;
  1328.      var NameIndex                : TNameIndex;
  1329.      var Properties               : TPascalConstantProperties;
  1330.      var BrowserOffset            : TFileOffset;
  1331.          ValueMaxLen              : TByteCount;
  1332.          Value                    : PChar)
  1333.                                   : TByteCount;    cdecl;
  1334.   procedure BorDebugSymbolBPREL32
  1335.     (    BorDebHandle             : TBorDebHandle;
  1336.          SymOffset                : TFileOffset;
  1337.      var EBPOffset                : TEBPOffset;
  1338.      var TypeIndex                : TTypeIndex;
  1339.      var NameIndex                : TNameIndex;
  1340.      var BrowserOffset            : TFileOffset);   cdecl;
  1341.   procedure BorDebugSymbolLDATA32
  1342.     (    BorDebHandle             : TBorDebHandle;
  1343.          SymOffset                : TFileOffset;
  1344.      var Offset                   : TSegmentOffset;
  1345.      var Segment                  : TSegmentIndex;
  1346.      var Flags                    : TSymbolFlags;
  1347.      var TypeIndex                : TTypeIndex;
  1348.      var NameIndex                : TNameIndex;
  1349.      var BrowserOffset            : TFileOffset);   cdecl;
  1350.   procedure BorDebugSymbolGDATA32
  1351.     (    BorDebHandle             : TBorDebHandle;
  1352.          SymOffset                : TFileOffset;
  1353.      var Offset                   : TSegmentOffset;
  1354.      var Segment                  : TSegmentIndex;
  1355.      var Flags                    : TSymbolFlags;
  1356.      var TypeIndex                : TTypeIndex;
  1357.      var NameIndex                : TNameIndex;
  1358.      var BrowserOffset            : TFileOffset);   cdecl;
  1359.   procedure BorDebugSymbolPUB32
  1360.     (    BorDebHandle             : TBorDebHandle;
  1361.          SymOffset                : TFileOffset;
  1362.      var Offset                   : TSegmentOffset;
  1363.      var Segment                  : TSegmentIndex;
  1364.      var Flags                    : TSymbolFlags;
  1365.      var TypeIndex                : TTypeIndex;
  1366.      var NameIndex                : TNameIndex;
  1367.      var BrowserOffset            : TFileOffset);   cdecl;
  1368.   procedure BorDebugSymbolLPROC32
  1369.     (    BorDebHandle             : TBorDebHandle;
  1370.          SymOffset                : TFileOffset;
  1371.      var Parent                   : TSubsectionDelta;
  1372.      var End_                     : TSubsectionDelta;
  1373.      var Next                     : TSubsectionDelta;
  1374.      var Len                      : TByteCount;
  1375.      var DebugStart               : TFileOffset;
  1376.      var DebugEnd                 : TFileOffset;
  1377.      var Offset                   : TSegmentOffset;
  1378.      var Segment                  : TSegmentIndex;
  1379.      var Flags                    : DWORD;
  1380.      var TypeIndex                : TTypeIndex;
  1381.      var NameIndex                : TNameIndex;
  1382.      var BrowserOffset            : TFileOffset);   cdecl;
  1383.   function BorDebugSymbolGPROC32
  1384.     (    BorDebHandle             : TBorDebHandle;
  1385.          SymOffset                : TFileOffset;
  1386.      var Parent                   : TSubsectionDelta;
  1387.      var End_                     : TSubsectionDelta;
  1388.      var Next                     : TSubsectionDelta;
  1389.      var Len                      : TByteCount;
  1390.      var DebugStart               : TFileOffset;
  1391.      var DebugEnd                 : TFileOffset;
  1392.      var Offset                   : TSegmentOffset;
  1393.      var Segment                  : TSegmentIndex;
  1394.      var Flags                    : DWORD;
  1395.      var TypeIndex                : TTypeIndex;
  1396.      var NameIndex                : TNameIndex;
  1397.      var BrowserOffset            : TFileOffset;
  1398.          LinkName                 : PChar;
  1399.          MaxLinkName              : TByteCount)
  1400.                                   : TByteCount;    cdecl;
  1401.   procedure BorDebugSymbolTHUNK32
  1402.     (    BorDebHandle             : TBorDebHandle;
  1403.          SymOffset                : TFileOffset;
  1404.      var Parent                   : TSubsectionDelta;
  1405.      var End_                     : TSubsectionDelta;
  1406.      var Next                     : TSubsectionDelta;
  1407.      var Offset                   : TSegmentOffset;
  1408.      var Segment                  : TSegmentIndex;
  1409.      var Length                   : TByteCount;
  1410.      var Ordinal                  : TThunkOrdinal;
  1411.      var NameIndex                : TNameIndex;
  1412.      var Delta                    : TByteCount);   cdecl;
  1413.   procedure BorDebugSymbolBLOCK32
  1414.     (    BorDebHandle             : TBorDebHandle;
  1415.          SymOffset                : TFileOffset;
  1416.      var Parent                   : TSubsectionDelta;
  1417.      var End_                     : TSubsectionDelta;
  1418.      var Length                   : TByteCount;
  1419.      var Offset                   : TSegmentOffset;
  1420.      var Segment                  : TSegmentIndex;
  1421.      var NameIndex                : TNameIndex);   cdecl;
  1422.   procedure BorDebugSymbolWITH32
  1423.     (    BorDebHandle             : TBorDebHandle;
  1424.          SymOffset                : TFileOffset;
  1425.      var Parent                   : TSubsectionDelta;
  1426.      var Length                   : TByteCount;
  1427.      var Offset                   : TSegmentOffset;
  1428.      var Segment                  : TSegmentIndex;
  1429.      var Flags                    : DWORD;
  1430.      var TypeIndex                : TTypeIndex;
  1431.      var NameIndex                : TNameIndex;
  1432.      var VarOffset                : TByteOffset);   cdecl;
  1433.   procedure BorDebugSymbolLABEL32
  1434.     (    BorDebHandle             : TBorDebHandle;
  1435.          SymOffset                : TFileOffset;
  1436.      var Offset                   : TSegmentOffset;
  1437.      var Segment                  : TSegmentIndex;
  1438.      var NearFar                  : TNearFar;
  1439.      var NameIndex                : TNameIndex);  cdecl;
  1440.   procedure BorDebugSymbolENTRY32
  1441.     (    BorDebHandle             : TBorDebHandle;
  1442.          SymOffset                : TFileOffset;
  1443.      var Offset                   : TSegmentOffset;
  1444.      var Segment                  : TSegmentIndex);  cdecl;
  1445.   function BorDebugSymbolOPTVAR32
  1446.     (    BorDebHandle             : TBorDebHandle;
  1447.          SymOffset                : TFileOffset;
  1448.          MaxEntries               : TItemCount;
  1449.          StartEntries             : PSegmentOffsets;
  1450.          LengthEntries            : PByteCounts;
  1451.          RegNameEntries           : PRegNameIndices)
  1452.                                   : TItemCount;   cdecl;
  1453.   procedure BorDebugSymbolPROCRET32
  1454.     (    BorDebHandle             : TBorDebHandle;
  1455.          SymOffset                : TFileOffset;
  1456.      var Offset                   : TSegmentOffset;
  1457.      var Length                   : TByteCount);  cdecl;
  1458.   procedure BorDebugSymbolSAVREGS32
  1459.     (    BorDebHandle             : TBorDebHandle;
  1460.          SymOffset                : TFileOffset;
  1461.      var Mask                     : TSaveRegs;
  1462.      var EBPOffset                : TEBPOffset);  cdecl;
  1463.   function BorDebugSymbolSLINK32
  1464.     (    BorDebHandle             : TBorDebHandle;
  1465.          SymOffset                : TFileOffset): TEBPOffset;   cdecl;
  1466.   procedure BorDebugSrcModule
  1467.     (    BorDebHandle             : TBorDebHandle;
  1468.          Offset                   : TFileOffset;
  1469.      var RangeCount               : TItemCount;
  1470.      var SourceCount              : TItemCount);  cdecl;
  1471.   procedure BorDebugSrcModuleRanges
  1472.     (    BorDebHandle             : TBorDebHandle;
  1473.          Offset                   : TFileOffset;
  1474.          Segments                 : PSegmentIndices;
  1475.          SegmentStarts            : PSegmentOffsets;
  1476.          SegmentEnds              : PSegmentOffsets);  cdecl;
  1477.   procedure BorDebugSrcModuleSources
  1478.     (    BorDebHandle             : TBorDebHandle;
  1479.          Offset                   : TFileOffset;
  1480.          SourceOffsets            : PFileOffsets;
  1481.          Names                    : PNameIndices;
  1482.          RangeCounts              : PItemCounts);  cdecl;
  1483.   procedure BorDebugSrcModuleSourceRanges
  1484.     (    BorDebHandle             : TBorDebHandle;
  1485.          Offset                   : TFileOffset;
  1486.          Source                   : TSourceFileIndex;
  1487.          Segments                 : PSegmentIndices;
  1488.          SegmentStarts            : PSegmentOffsets;
  1489.          SegmentEnds              : PSegmentOffsets;
  1490.          LineNumberCounts         : PItemCounts);  cdecl;
  1491.   procedure BorDebugSrcModuleLineNumbers
  1492.     (    BorDebHandle             : TBorDebHandle;
  1493.          Offset                   : TFileOffset;
  1494.          Source                   : TSourceFileIndex;
  1495.          Range                    : TRangeIndex;
  1496.          LineNumbers              : PLineNumbers;
  1497.          LineOffsets              : PSegmentOffsets);  cdecl;
  1498.   procedure BorDebugGlobalSym
  1499.     (    BorDebHandle             : TBorDebHandle;
  1500.          Offset                   : TFileOffset;
  1501.      var SymHashFunction          : TNameIndex;
  1502.      var AddrHashFunction         : TNameIndex;
  1503.      var SymTableBytes            : TByteCount;
  1504.      var SymHashTableBytes        : TByteCount;
  1505.      var AddrHashTableBytes       : TByteCount;
  1506.      var TotalUDTs                : TItemCount;
  1507.      var TotalOtherSyms           : TItemCount;
  1508.      var TotalSymbols             : TItemCount;
  1509.      var TotalNameSpaces          : TItemCount);  cdecl;
  1510.   procedure BorDebugGlobalTypes
  1511.     (    BorDebHandle             : TBorDebHandle;
  1512.      var Signature                : TSignature;
  1513.      var TotalTypes               : TItemCount);  cdecl;
  1514.   procedure BorDebugTypeFromIndex
  1515.     (    BorDebHandle             : TBorDebHandle;
  1516.          TypeIndex                : TTypeIndex;
  1517.      var TypeOffset               : TFileOffset;
  1518.      var Length                   : TByteCount;
  1519.      var TypeKind                 : TTypeKind);  cdecl;
  1520.   procedure BorDebugTypeFromOffset
  1521.     (    BorDebHandle             : TBorDebHandle;
  1522.          TypeOffset               : TFileOffset;
  1523.      var Length                   : TByteCount;
  1524.      var TypeKind                 : TTypeKind);  cdecl;
  1525.   procedure BorDebugTypeMODIFIER
  1526.     (    BorDebHandle             : TBorDebHandle;
  1527.          TypeOffset               : TFileOffset;
  1528.      var Attributes               : TTypeModifierAttr;
  1529.      var TypeIndex                : TTypeIndex);  cdecl;
  1530.   procedure BorDebugTypePOINTER
  1531.     (    BorDebHandle             : TBorDebHandle;
  1532.          TypeOffset               : TFileOffset;
  1533.      var Attributes               : TTypePointerAttr;
  1534.      var TypeIndex                : TTypeIndex;
  1535.      var Value1                   : TTypePointerValue1;
  1536.      var Value2                   : TTypePointerValue2);  cdecl;
  1537.   procedure BorDebugTypeARRAY
  1538.     (    BorDebHandle             : TBorDebHandle;
  1539.          TypeOffset               : TFileOffset;
  1540.      var ElementType              : TTypeIndex;
  1541.      var IndexType                : TTypeIndex;
  1542.      var NameIndex                : TNameIndex;
  1543.      var Size                     : TByteCount;
  1544.      var Elements                 : TItemCount);  cdecl;
  1545.   procedure BorDebugTypeCLASS
  1546.     (    BorDebHandle             : TBorDebHandle;
  1547.          TypeOffset               : TFileOffset;
  1548.      var FieldCount               : TItemCount;
  1549.      var FieldList                : TTypeIndex;
  1550.      var ClassFlags               : TClassFlags;
  1551.      var ContainingClass          : TTypeIndex;
  1552.      var DerivationList           : TTypeIndex;
  1553.      var Vtable                   : TTypeIndex;
  1554.      var NameIndex                : TNameIndex;
  1555.      var ClassSize                : TByteCount);  cdecl;
  1556.   procedure BorDebugTypeUNION
  1557.     (    BorDebHandle             : TBorDebHandle;
  1558.          TypeOffset               : TFileOffset;
  1559.      var FieldCount               : TItemCount;
  1560.      var FieldList                : TTypeIndex;
  1561.      var ClassFlags               : TClassFlags;
  1562.      var ContainingClass          : TTypeIndex;
  1563.      var NameIndex                : TNameIndex;
  1564.      var ClassSize                : TByteCount);  cdecl;
  1565.   procedure BorDebugTypeENUM
  1566.     (    BorDebHandle             : TBorDebHandle;
  1567.          TypeOffset               : TFileOffset;
  1568.      var MemberCount              : TItemCount;
  1569.      var UnderlyingType           : TTypeIndex;
  1570.      var MemberList               : TTypeIndex;
  1571.      var ContainingClass          : TTypeIndex;
  1572.      var NameIndex                : TNameIndex);  cdecl;
  1573.   procedure BorDebugTypePROCEDURE
  1574.     (    BorDebHandle             : TBorDebHandle;
  1575.          TypeOffset               : TFileOffset;
  1576.      var ReturnType               : TTypeIndex;
  1577.      var CallingConvention        : TCallingConvention;
  1578.      var ArgCount                 : TItemCount;
  1579.      var ArgList                  : TTypeIndex);  cdecl;
  1580.   procedure BorDebugTypeMFUNCTION
  1581.     (    BorDebHandle             : TBorDebHandle;
  1582.          TypeOffset               : TFileOffset;
  1583.      var ReturnType               : TTypeIndex;
  1584.      var ClassType                : TTypeIndex;
  1585.      var ThisType                 : TTypeIndex;
  1586.      var CallingConvention        : TCallingConvention;
  1587.      var ArgCount                 : TItemCount;
  1588.      var ArgList                  : TTypeIndex;
  1589.      var ThisAdjust               : TSegmentOffset {?});  cdecl;
  1590.   function BorDebugTypeVTSHAPE
  1591.     (    BorDebHandle             : TBorDebHandle;
  1592.          TypeOffset               : TFileOffset;
  1593.          MaxCount                 : TItemCount;
  1594.          DescriptorArray          : PVtblShapeDescriptors)
  1595.                                   : TItemCount;   cdecl;
  1596.   function BorDebugTypeLABEL
  1597.     (    BorDebHandle             : TBorDebHandle;
  1598.          TypeOffset               : TFileOffset)
  1599.                                   : TNearFar;   cdecl;
  1600.   procedure BorDebugTypeSET
  1601.     (    BorDebHandle             : TBorDebHandle;
  1602.          TypeOffset               : TFileOffset;
  1603.      var ElemType                 : TTypeIndex;
  1604.      var NameIndex                : TNameIndex;
  1605.      var LowByte                  : DWORD;
  1606.      var Length                   : TItemCount);  cdecl;
  1607.   procedure BorDebugTypeSUBRANGE
  1608.     (    BorDebHandle             : TBorDebHandle;
  1609.          TypeOffset               : TFileOffset;
  1610.      var BaseType                 : TTypeIndex;
  1611.      var NameIndex                : TNameIndex;
  1612.      var LoBound                  : DWORD;
  1613.      var HiBound                  : DWORD;
  1614.      var Size                     : TByteCount);  cdecl;
  1615.   procedure BorDebugTypePARRAY
  1616.     (    BorDebHandle             : TBorDebHandle;
  1617.          TypeOffset               : TFileOffset;
  1618.      var ElementType              : TTypeIndex;
  1619.      var IndexType                : TTypeIndex;
  1620.      var NameIndex                : TNameIndex;
  1621.      var Size                     : TByteCount;
  1622.      var Elements                 : TItemCount);  cdecl;
  1623.   procedure BorDebugTypePSTRING
  1624.     (    BorDebHandle             : TBorDebHandle;
  1625.          TypeOffset               : TFileOffset;
  1626.      var ElemType                 : TTypeIndex;
  1627.      var IndexType                : TTypeIndex;
  1628.      var NameIndex                : TNameIndex);  cdecl;
  1629.   procedure BorDebugTypeCLOSURE
  1630.     (    BorDebHandle             : TBorDebHandle;
  1631.          TypeOffset               : TFileOffset;
  1632.      var ReturnType               : TTypeIndex;
  1633.      var CallingConvention        : TCallingConvention;
  1634.      var ArgCount                 : TItemCount;
  1635.      var ArgList                  : TTypeIndex);  cdecl;
  1636.   procedure BorDebugTypePROPERTY
  1637.     (    BorDebHandle             : TBorDebHandle;
  1638.          TypeOffset               : TFileOffset;
  1639.      var TypeIndex                : TTypeIndex;
  1640.      var Flags                    : TPropertyFlags;
  1641.      var ArrayIndex               : TTypeIndex;
  1642.      var PropIndex                : TPropertyIndex;
  1643.      var ReadSlot                 : TPropertySlot;
  1644.      var WriteSlot                : TPropertySlot);  cdecl;
  1645.   function BorDebugTypeLSTRING
  1646.     (    BorDebHandle             : TBorDebHandle;
  1647.          TypeOffset               : TFileOffset)
  1648.                                   : TNameIndex;   cdecl;
  1649.   function BorDebugTypeVARIANT
  1650.     (    BorDebHandle             : TBorDebHandle;
  1651.          TypeOffset               : TFileOffset)
  1652.                                   : TNameIndex;   cdecl;
  1653.   procedure BorDebugTypeCLASSREF
  1654.     (    BorDebHandle             : TBorDebHandle;
  1655.          TypeOffset               : TFileOffset;
  1656.      var RefType                  : TTypeIndex;
  1657.      var VtShape                  : TTypeIndex);  cdecl;
  1658.   function BorDebugTypeWSTRING
  1659.     (    BorDebHandle             : TBorDebHandle;
  1660.          TypeOffset               : TFileOffset)
  1661.                                   : TNameIndex;   cdecl;
  1662.   function BorDebugTypeARGLIST
  1663.     (    BorDebHandle             : TBorDebHandle;
  1664.          TypeOffset               : TFileOffset;
  1665.          MaxTypes                 : TItemCount;
  1666.          TypeArray                : PTypeIndices)
  1667.                                   : TItemCount;   cdecl;
  1668.   procedure BorDebugTypeStartFIELDLIST
  1669.     (    BorDebHandle             : TBorDebHandle;
  1670.          TypeOffset               : TFileOffset);  cdecl;
  1671.   procedure BorDebugTypeNextFIELDLIST
  1672.     (    BorDebHandle             : TBorDebHandle;
  1673.      var Kind                     : TTypeKind;
  1674.      var Offset                   : TFileOffset);  cdecl;
  1675.   function BorDebugTypeDERIVED
  1676.     (    BorDebHandle             : TBorDebHandle;
  1677.          TypeOffset               : TFileOffset;
  1678.          MaxTypes                 : TItemCount;
  1679.          DerivedTypes             : PTypeIndices)
  1680.                                   : TItemCount;   cdecl;
  1681.   procedure BorDebugTypeBITFIELD
  1682.     (    BorDebHandle             : TBorDebHandle;
  1683.          TypeOffset               : TFileOffset;
  1684.      var Length                   : TBitCount;
  1685.      var Position                 : TBitPosition;
  1686.      var TypeIndex                : TTypeIndex);  cdecl;
  1687.   function BorDebugTypeMETHODLIST
  1688.     (    BorDebHandle             : TBorDebHandle;
  1689.          TypeOffset               : TFileOffset;
  1690.          MaxMethods               : TItemCount;
  1691.          TypeArray                : PTypeIndices;
  1692.          AttribArray              : PClassMemberAttribs;
  1693.          BrowserArray             : PFileOffsets;
  1694.          VtabOffArray             : PVtabOffsets)
  1695.                                   : TItemCount;   cdecl;
  1696.   procedure BorDebugTypeBCLASS
  1697.     (    BorDebHandle             : TBorDebHandle;
  1698.          TypeOffset               : TFileOffset;
  1699.      var BaseType                 : TTypeIndex;
  1700.      var Attrib                   : TClassMemberAttrib;
  1701.      var Offset                   : TVtabOffset);  cdecl;
  1702.   procedure BorDebugTypeVBCLASS
  1703.     (    BorDebHandle             : TBorDebHandle;
  1704.          TypeOffset               : TFileOffset;
  1705.      var vbType                   : TTypeIndex;
  1706.      var vbpType                  : TTypeIndex;
  1707.      var Attrib                   : TClassMemberAttrib;
  1708.      var VbpOffset                : TVtabOffset;
  1709.      var Offset                   : TVtabOffset);  cdecl;
  1710.   procedure BorDebugTypeIVBCLASS
  1711.     (    BorDebHandle             : TBorDebHandle;
  1712.          TypeOffset               : TFileOffset;
  1713.      var vbType                   : TTypeIndex;
  1714.      var vbpType                  : TTypeIndex;
  1715.      var Attrib                   : TClassMemberAttrib;
  1716.      var VbpOffset                : TVtabOffset;
  1717.      var Offset                   : TVtabOffset);  cdecl;
  1718.   procedure BorDebugTypeENUMERATE
  1719.     (    BorDebHandle             : TBorDebHandle;
  1720.          TypeOffset               : TFileOffset;
  1721.      var Attrib                   : DWORD;
  1722.      var NameIndex                : TNameIndex;
  1723.      var BrowserOffset            : TFileOffset;
  1724.      var Value                    : DWORD);  cdecl;
  1725.   procedure BorDebugTypeFRIENDFCN
  1726.     (    BorDebHandle             : TBorDebHandle;
  1727.          TypeOffset               : TFileOffset;
  1728.      var TypeIndex                : TTypeIndex;
  1729.      var NameIndex                : TNameIndex);  cdecl;
  1730.   function BorDebugTypeINDEX
  1731.     (    BorDebHandle             : TBorDebHandle;
  1732.          TypeOffset               : TFileOffset)
  1733.                                   : TTypeIndex;   cdecl;
  1734.   procedure BorDebugTypeMEMBER
  1735.     (    BorDebHandle             : TBorDebHandle;
  1736.          TypeOffset               : TFileOffset;
  1737.      var TypeIndex                : TTypeIndex;
  1738.      var Attrib                   : TClassMemberAttrib;
  1739.      var NameIndex                : TNameIndex;
  1740.      var Offset                   : TInstanceOffset;
  1741.      var BrowserOffset            : TFileOffset);  cdecl;
  1742.   procedure BorDebugTypeSTMEMBER
  1743.     (    BorDebHandle             : TBorDebHandle;
  1744.          TypeOffset               : TFileOffset;
  1745.      var TypeIndex                : TTypeIndex;
  1746.      var Attrib                   : TClassMemberAttrib;
  1747.      var NameIndex                : TNameIndex;
  1748.      var BrowserOffset            : TFileOffset);  cdecl;
  1749.   procedure BorDebugTypeMETHOD
  1750.     (    BorDebHandle             : TBorDebHandle;
  1751.          TypeOffset               : TFileOffset;
  1752.      var OverloadedCount          : TItemCount;
  1753.      var MethodList               : TTypeIndex;
  1754.      var NameIndex                : TNameIndex);  cdecl;
  1755.   procedure BorDebugTypeNESTTYPE
  1756.     (    BorDebHandle             : TBorDebHandle;
  1757.          TypeOffset               : TFileOffset;
  1758.      var TypeIndex                : TTypeIndex;
  1759.      var NameIndex                : TNameIndex;
  1760.      var BrowserOffset            : TFileOffset);  cdecl;
  1761.   procedure BorDebugTypeVFUNCTAB
  1762.     (    BorDebHandle             : TBorDebHandle;
  1763.          TypeOffset               : TFileOffset;
  1764.      var TypeIndex                : TTypeIndex;
  1765.      var Offset                   : TVtabOffset);  cdecl;
  1766.   function BorDebugTypeFRIENDCLS
  1767.     (    BorDebHandle             : TBorDebHandle;
  1768.          TypeOffset               : TFileOffset)
  1769.                                   : TTypeIndex;   cdecl;
  1770.   function BorDebugTypeCHAR
  1771.     (    BorDebHandle             : TBorDebHandle;
  1772.          TypeOffset               : TFileOffset)
  1773.                                   : Char;    cdecl;
  1774.   function BorDebugTypeSHORT
  1775.     (    BorDebHandle             : TBorDebHandle;
  1776.          TypeOffset               : TFileOffset)
  1777.                                   : SmallInt;cdecl;
  1778.   function BorDebugTypeUSHORT
  1779.     (    BorDebHandle             : TBorDebHandle;
  1780.          TypeOffset               : TFileOffset)
  1781.                                   : DWORD;   cdecl;
  1782.   function BorDebugTypeLONG
  1783.     (    BorDebHandle             : TBorDebHandle;
  1784.          TypeOffset               : TFileOffset)
  1785.                                   : LongInt; cdecl;
  1786.   function BorDebugTypeULONG
  1787.     (    BorDebHandle             : TBorDebHandle;
  1788.          TypeOffset               : TFileOffset)
  1789.                                   : DWORD;   cdecl;
  1790.   function BorDebugTypeREAL32
  1791.     (    BorDebHandle             : TBorDebHandle;
  1792.          TypeOffset               : TFileOffset)
  1793.                                   : Single;  cdecl;
  1794.   function BorDebugTypeREAL64
  1795.     (    BorDebHandle             : TBorDebHandle;
  1796.          TypeOffset               : TFileOffset)
  1797.                                   : Double;  cdecl;
  1798.   function BorDebugTypeREAL80
  1799.     (    BorDebHandle             : TBorDebHandle;
  1800.          TypeOffset               : TFileOffset)
  1801.                                   : Extended;cdecl;
  1802.   function BorDebugTypeQUADWORD
  1803.     (    BorDebHandle             : TBorDebHandle;
  1804.          TypeOffset               : TFileOffset)
  1805.                                   : QUADWORD;cdecl;
  1806.   function BorDebugTypeUQUADWORD
  1807.     (    BorDebHandle             : TBorDebHandle;
  1808.          TypeOffset               : TFileOffset)
  1809.                                   : UQUADWORD;cdecl;
  1810.   function BorDebugTypeREAL48
  1811.     (    BorDebHandle             : TBorDebHandle;
  1812.          TypeOffset               : TFileOffset)
  1813.                                   : TREAL48;  cdecl;
  1814.   function BorDebugNamesTotalNames
  1815.     (    BorDebHandle             : TBorDebHandle)
  1816.                                   : TItemCount;   cdecl;
  1817.   procedure BorDebugNameIndexToUnmangledName
  1818.     (    BorDebHandle             : TBorDebHandle;
  1819.          NameIndex                : TNameIndex;
  1820.          Buf                      : PChar;
  1821.          BufLen                   : TByteCount);  cdecl;
  1822.   procedure BorDebugNameIndexToName
  1823.     (    BorDebHandle             : TBorDebHandle;
  1824.          NameIndex                : TNameIndex;
  1825.          Buf                      : PChar;
  1826.          BufLen                   : TByteCount);  cdecl;
  1827.   procedure BorDebugRegIndexToName
  1828.     (    BorDebHandle             : TBorDebHandle;
  1829.          Reg                      : TRegNameIndex;
  1830.          Buf                      : PChar;
  1831.          BufLen                   : TByteCount);  cdecl;
  1832.   procedure BorDebugTypeIndexToString
  1833.     (    BorDebHandle             : TBorDebHandle;
  1834.          TypeIndex                : TTypeIndex;
  1835.          Buf                      : PChar;
  1836.          BufLen                   : TByteCount);  cdecl;
  1837.   function BorDebugUnmangle
  1838.     (    Src                      : PChar;
  1839.          Dest                     : PChar;
  1840.          MaxLen                   : TByteCount;
  1841.          QualP                    : PChar;  // or nil
  1842.          BaseP                    : PChar;  // or nil
  1843.          DoArgs                   : LongBool)
  1844.                                   : TBorDebugUmKind; cdecl;
  1845. {$ENDIF}
  1846.  
  1847. implementation
  1848.  
  1849. {$IFDEF BORDEB_EXTRAS}
  1850. // Extra nice-to have functionality:
  1851. {$IFDEF VER90}
  1852. const
  1853. {$ELSE}
  1854. resourcestring
  1855. {$ENDIF}
  1856.   SBorDebErrorOk           = 'Ok';
  1857.   SBorDebErrorUnknownExt   = 'Extension not recognized';
  1858.   SBorDebErrorCannotOpen   = 'Cannot open the file';
  1859.   SBorDebErrorNoDebugInfo  = 'No debug info in the file';
  1860.   SBorDebErrorErrorReading = 'Failures while reading from the file';
  1861.   SBorDebErrorOutOfMemory  = 'Out of memory';
  1862.   SBorDebErrorUknown       = 'Unknown error: %d';
  1863.  
  1864. function BorDebErrorToString(BorDebError: TBorDebError): string;
  1865. begin
  1866.   case BorDebError of
  1867.      deOk           : Result := SBorDebErrorOk           ;
  1868.      deUnknownExt   : Result := SBorDebErrorUnknownExt   ;
  1869.      deCannotOpen   : Result := SBorDebErrorCannotOpen   ;
  1870.      deNoDebugInfo  : Result := SBorDebErrorNoDebugInfo  ;
  1871.      deErrorReading : Result := SBorDebErrorErrorReading ;
  1872.      deOutOfMemory  : Result := SBorDebErrorOutOfMemory  ;
  1873.      else             Result := Format(SBorDebErrorUknown, [Ord(BorDebError)]);
  1874.   end;
  1875. end;
  1876.  
  1877. constructor EBorDebugError.CreateFromError(BorDebError: TBorDebError);
  1878. begin
  1879.   inherited Create(BorDebErrorToString(BorDebError));
  1880.   Self.BorDebError := BorDebError
  1881. end;
  1882.  
  1883. function CheckBorDebHandleAndError(
  1884.         BorDebHandle: TBorDebHandle;
  1885.         BorDebError : TBorDebError)
  1886.                     : TBorDebHandle;
  1887. begin
  1888.   if (BorDebHandle = InvalidBorDebHandle) or (BorDebError <> deOk) then
  1889.     raise EBorDebugError.CreateFromError(BorDebError);
  1890.   Result := BorDebHandle;
  1891. end;
  1892.  
  1893. // Throws exception if something goes wrong:
  1894.  
  1895. function BorDebugRegisterFileEx
  1896.   (const FileName                 : string;
  1897.          SkipNames                : LongBool;
  1898.          CacheNames               : LongBool;
  1899.          TryTDSFile               : boolean) : TBorDebHandle;
  1900. var
  1901.   BorDebError: TBorDebError;
  1902.   TDSBorDebError: TBorDebError;
  1903.   TDSFileName: string;
  1904. begin
  1905.   Result := BorDebugRegisterFile(PChar(FileName), SkipNames, CacheNames, BorDebError);
  1906.   if (BorDebError in [deUnknownExt, deCannotOpen, deNoDebugInfo]) and TryTDSFile then
  1907.   begin
  1908.     TDSFileName := ChangeFileExt(FileName, '.TDS');
  1909.     Result := BorDebugRegisterFile(PChar(TDSFileName), SkipNames, CacheNames, TDSBorDebError);
  1910.   end;
  1911.   Result := CheckBorDebHandleAndError(Result, BorDebError);
  1912. end;
  1913.  
  1914. function CrackCompilerSymbolFlags(const Flags: TCompileSymbolFlags): TCrackedCompileSymbolFlags;
  1915. begin
  1916.   with Result do
  1917.   begin
  1918.     PCodePresent   := boolean        ((Flags and $0001) shr  0); // : 0
  1919.     FloatPrecision := TFloatPrecision((Flags and $0006) shr  1); // : 1-2
  1920.     FloatPackage   := TFloatPackage  ((Flags and $0018) shr  3); // : 3-4
  1921.     AmbientData    := TAmbientAttr   ((Flags and $00E0) shr  5); // : 5-7
  1922.     AmbientCode    := TAmbientAttr   ((Flags and $0700) shr  8); // : 8-10
  1923.     Mode32         := boolean        ((Flags and $0800) shr 11); // : 11
  1924.     CharIsSigned   := boolean        ((Flags and $1000) shr 12); // : 12
  1925.     Reserverd      := ((Flags and DWORD($FFFFE000))     shr 13); // : :13-31
  1926.   end;
  1927. end;
  1928.  
  1929. function CrackClassMemberAttrib(const Attrib: TClassMemberAttrib): TCrackedClassMemberAttrib;
  1930. begin
  1931.   with Result do
  1932.   begin
  1933.     ClassMemberProtection := TClassMemberProtection((Attrib and $0003) shr 0); // :0-1
  1934.     ClassMemberProperty   := TClassMemberProperty  ((Attrib and $001C) shr 2); // :2-4
  1935.     Reserved              := ((Attrib and DWORD($FFFFFFE0))            shr 5); // :5-31
  1936.   end;
  1937. end;
  1938.  
  1939. function CrackTypePointerAttr(const Attrib: TTypePointerAttr): TCrackedTypePointerAttr;
  1940. begin
  1941.   with Result do
  1942.   begin
  1943.     TypeModifier  := TPointerTypeModifier((Attrib and $000F) shr  0); // :0-4
  1944.     Mode          := TPointerMode        ((Attrib and $0070) shr  5); // :5-7
  1945.     IsFlat32      := boolean             ((Attrib and $0080) shr  8); // :8
  1946.     IsVolatile    := boolean             ((Attrib and $0100) shr  9); // :9
  1947.     IsConst       := boolean             ((Attrib and $0200) shr 10); // :10
  1948.     Reserved      := ((Attrib and DWORD($FFFFFC00))          shr 11); // :11-31
  1949.   end;
  1950. end;
  1951. {$ENDIF BORDEB_EXTRAS}
  1952.  
  1953. const
  1954.   BorDebugName = 'BORDEBUG.DLL';
  1955.  
  1956. {$IFDEF DYNLINK_BORDEBUG}
  1957. var
  1958.   Entries : array[1..103] of HVDll.TEntry =
  1959.     ((Proc: @@BorDebugRegisterFile;             Name: '_BorDebugRegisterFile'),
  1960.      (Proc: @@BorDebugUnregisterFile;           Name: '_BorDebugUnregisterFile'),
  1961.      (Proc: @@BorDebugSubSectionDirOffset;      Name: '_BorDebugSubSectionDirOffset'),
  1962.      (Proc: @@BorDebugSubSectionCount;          Name: '_BorDebugSubSectionCount'),
  1963.      (Proc: @@BorDebugSubSection;               Name: '_BorDebugSubSection'),
  1964.      (Proc: @@BorDebugModule;                   Name: '_BorDebugModule'),
  1965.      (Proc: @@BorDebugModuleSegment;            Name: '_BorDebugModuleSegment'),
  1966.      (Proc: @@BorDebugStartSymbols;             Name: '_BorDebugStartSymbols'),
  1967.      (Proc: @@BorDebugNextSymbol;               Name: '_BorDebugNextSymbol'),
  1968.      (Proc: @@BorDebugDumpBrowserInfo;          Name: '_BorDebugDumpBrowserInfo'),
  1969.      (Proc: @@BorDebugSymbolCOMPILE;            Name: '_BorDebugSymbolCOMPILE'),
  1970.      (Proc: @@BorDebugSymbolREGISTER;           Name: '_BorDebugSymbolREGISTER'),
  1971.      (Proc: @@BorDebugSymbolCONST;              Name: '_BorDebugSymbolCONST'),
  1972.      (Proc: @@BorDebugSymbolUDT;                Name: '_BorDebugSymbolUDT'),
  1973.      (Proc: @@BorDebugSymbolSSEARCH;            Name: '_BorDebugSymbolSSEARCH'),
  1974.      (Proc: @@BorDebugSymbolOBJNAME;            Name: '_BorDebugSymbolOBJNAME'),
  1975.      (Proc: @@BorDebugSymbolGPROCREF;           Name: '_BorDebugSymbolGPROCREF'),
  1976.      (Proc: @@BorDebugSymbolGDATAREF;           Name: '_BorDebugSymbolGDATAREF'),
  1977.      (Proc: @@BorDebugSymbolEDATA;              Name: '_BorDebugSymbolEDATA'),
  1978.      (Proc: @@BorDebugSymbolEPROC;              Name: '_BorDebugSymbolEPROC'),
  1979.      (Proc: @@BorDebugSymbolUSES;               Name: '_BorDebugSymbolUSES'),
  1980.      (Proc: @@BorDebugSymbolNAMESPACE;          Name: '_BorDebugSymbolNAMESPACE'),
  1981.      (Proc: @@BorDebugSymbolUSING;              Name: '_BorDebugSymbolUSING'),
  1982.      (Proc: @@BorDebugSymbolPCONSTANT;          Name: '_BorDebugSymbolPCONSTANT'),
  1983.      (Proc: @@BorDebugSymbolBPREL32;            Name: '_BorDebugSymbolBPREL32'),
  1984.      (Proc: @@BorDebugSymbolLDATA32;            Name: '_BorDebugSymbolLDATA32'),
  1985.      (Proc: @@BorDebugSymbolGDATA32;            Name: '_BorDebugSymbolGDATA32'),
  1986.      (Proc: @@BorDebugSymbolPUB32;              Name: '_BorDebugSymbolPUB32'),
  1987.      (Proc: @@BorDebugSymbolLPROC32;            Name: '_BorDebugSymbolLPROC32'),
  1988.      (Proc: @@BorDebugSymbolGPROC32;            Name: '_BorDebugSymbolGPROC32'),
  1989.      (Proc: @@BorDebugSymbolTHUNK32;            Name: '_BorDebugSymbolTHUNK32'),
  1990.      (Proc: @@BorDebugSymbolBLOCK32;            Name: '_BorDebugSymbolBLOCK32'),
  1991.      (Proc: @@BorDebugSymbolWITH32;             Name: '_BorDebugSymbolWITH32'),
  1992.      (Proc: @@BorDebugSymbolLABEL32;            Name: '_BorDebugSymbolLABEL32'),
  1993.      (Proc: @@BorDebugSymbolENTRY32;            Name: '_BorDebugSymbolENTRY32'),
  1994.      (Proc: @@BorDebugSymbolOPTVAR32;           Name: '_BorDebugSymbolOPTVAR32'),
  1995.      (Proc: @@BorDebugSymbolPROCRET32;          Name: '_BorDebugSymbolPROCRET32'),
  1996.      (Proc: @@BorDebugSymbolSAVREGS32;          Name: '_BorDebugSymbolSAVREGS32'),
  1997.      (Proc: @@BorDebugSymbolSLINK32;            Name: '_BorDebugSymbolSLINK32'),
  1998.      (Proc: @@BorDebugSrcModule;                Name: '_BorDebugSrcModule'),
  1999.      (Proc: @@BorDebugSrcModuleRanges;          Name: '_BorDebugSrcModuleRanges'),
  2000.      (Proc: @@BorDebugSrcModuleSources;         Name: '_BorDebugSrcModuleSources'),
  2001.      (Proc: @@BorDebugSrcModuleSourceRanges;    Name: '_BorDebugSrcModuleSourceRanges'),
  2002.      (Proc: @@BorDebugSrcModuleLineNumbers;     Name: '_BorDebugSrcModuleLineNumbers'),
  2003.      (Proc: @@BorDebugGlobalSym;                Name: '_BorDebugGlobalSym'),
  2004.      (Proc: @@BorDebugGlobalTypes;              Name: '_BorDebugGlobalTypes'),
  2005.      (Proc: @@BorDebugTypeFromIndex;            Name: '_BorDebugTypeFromIndex'),
  2006.      (Proc: @@BorDebugTypeFromOffset;           Name: '_BorDebugTypeFromOffset'),
  2007.      (Proc: @@BorDebugTypeMODIFIER;             Name: '_BorDebugTypeMODIFIER'),
  2008.      (Proc: @@BorDebugTypePOINTER;              Name: '_BorDebugTypePOINTER'),
  2009.      (Proc: @@BorDebugTypeARRAY;                Name: '_BorDebugTypeARRAY'),
  2010.      (Proc: @@BorDebugTypeCLASS;                Name: '_BorDebugTypeCLASS'),
  2011.      (Proc: @@BorDebugTypeUNION;                Name: '_BorDebugTypeUNION'),
  2012.      (Proc: @@BorDebugTypeENUM;                 Name: '_BorDebugTypeENUM'),
  2013.      (Proc: @@BorDebugTypePROCEDURE;            Name: '_BorDebugTypePROCEDURE'),
  2014.      (Proc: @@BorDebugTypeMFUNCTION;            Name: '_BorDebugTypeMFUNCTION'),
  2015.      (Proc: @@BorDebugTypeVTSHAPE;              Name: '_BorDebugTypeVTSHAPE'),
  2016.      (Proc: @@BorDebugTypeLABEL;                Name: '_BorDebugTypeLABEL'),
  2017.      (Proc: @@BorDebugTypeSET;                  Name: '_BorDebugTypeSET'),
  2018.      (Proc: @@BorDebugTypeSUBRANGE;             Name: '_BorDebugTypeSUBRANGE'),
  2019.      (Proc: @@BorDebugTypePARRAY;               Name: '_BorDebugTypePARRAY'),
  2020.      (Proc: @@BorDebugTypePSTRING;              Name: '_BorDebugTypePSTRING'),
  2021.      (Proc: @@BorDebugTypeCLOSURE;              Name: '_BorDebugTypeCLOSURE'),
  2022.      (Proc: @@BorDebugTypePROPERTY;             Name: '_BorDebugTypePROPERTY'),
  2023.      (Proc: @@BorDebugTypeLSTRING;              Name: '_BorDebugTypeLSTRING'),
  2024.      (Proc: @@BorDebugTypeVARIANT;              Name: '_BorDebugTypeVARIANT'),
  2025.      (Proc: @@BorDebugTypeCLASSREF;             Name: '_BorDebugTypeCLASSREF'),
  2026.      (Proc: @@BorDebugTypeWSTRING;              Name: '_BorDebugTypeWSTRING'),
  2027.      (Proc: @@BorDebugTypeARGLIST;              Name: '_BorDebugTypeARGLIST'),
  2028.      (Proc: @@BorDebugTypeStartFIELDLIST;       Name: '_BorDebugTypeStartFIELDLIST'),
  2029.      (Proc: @@BorDebugTypeNextFIELDLIST;        Name: '_BorDebugTypeNextFIELDLIST'),
  2030.      (Proc: @@BorDebugTypeDERIVED;              Name: '_BorDebugTypeDERIVED'),
  2031.      (Proc: @@BorDebugTypeBITFIELD;             Name: '_BorDebugTypeBITFIELD'),
  2032.      (Proc: @@BorDebugTypeMETHODLIST;           Name: '_BorDebugTypeMETHODLIST'),
  2033.      (Proc: @@BorDebugTypeBCLASS;               Name: '_BorDebugTypeBCLASS'),
  2034.      (Proc: @@BorDebugTypeVBCLASS;              Name: '_BorDebugTypeVBCLASS'),
  2035.      (Proc: @@BorDebugTypeIVBCLASS;             Name: '_BorDebugTypeIVBCLASS'),
  2036.      (Proc: @@BorDebugTypeENUMERATE;            Name: '_BorDebugTypeENUMERATE'),
  2037.      (Proc: @@BorDebugTypeFRIENDFCN;            Name: '_BorDebugTypeFRIENDFCN'),
  2038.      (Proc: @@BorDebugTypeINDEX;                Name: '_BorDebugTypeINDEX'),
  2039.      (Proc: @@BorDebugTypeMEMBER;               Name: '_BorDebugTypeMEMBER'),
  2040.      (Proc: @@BorDebugTypeSTMEMBER;             Name: '_BorDebugTypeSTMEMBER'),
  2041.      (Proc: @@BorDebugTypeMETHOD;               Name: '_BorDebugTypeMETHOD'),
  2042.      (Proc: @@BorDebugTypeNESTTYPE;             Name: '_BorDebugTypeNESTTYPE'),
  2043.      (Proc: @@BorDebugTypeVFUNCTAB;             Name: '_BorDebugTypeVFUNCTAB'),
  2044.      (Proc: @@BorDebugTypeFRIENDCLS;            Name: '_BorDebugTypeFRIENDCLS'),
  2045.      (Proc: @@BorDebugTypeCHAR;                 Name: '_BorDebugTypeCHAR'),
  2046.      (Proc: @@BorDebugTypeSHORT;                Name: '_BorDebugTypeSHORT'),
  2047.      (Proc: @@BorDebugTypeUSHORT;               Name: '_BorDebugTypeUSHORT'),
  2048.      (Proc: @@BorDebugTypeLONG;                 Name: '_BorDebugTypeLONG'),
  2049.      (Proc: @@BorDebugTypeULONG;                Name: '_BorDebugTypeULONG'),
  2050.      (Proc: @@BorDebugTypeREAL32;               Name: '_BorDebugTypeREAL32'),
  2051.      (Proc: @@BorDebugTypeREAL64;               Name: '_BorDebugTypeREAL64'),
  2052.      (Proc: @@BorDebugTypeREAL80;               Name: '_BorDebugTypeREAL80'),
  2053.      (Proc: @@BorDebugTypeQUADWORD;             Name: '_BorDebugTypeQUADWORD'),
  2054.      (Proc: @@BorDebugTypeUQUADWORD;            Name: '_BorDebugTypeUQUADWORD'),
  2055.      (Proc: @@BorDebugTypeREAL48;               Name: '_BorDebugTypeREAL48'),
  2056.      (Proc: @@BorDebugNamesTotalNames;          Name: '_BorDebugNamesTotalNames'),
  2057.      (Proc: @@BorDebugNameIndexToUnmangledName; Name: '_BorDebugNameIndexToUnmangledName'),
  2058.      (Proc: @@BorDebugNameIndexToName;          Name: '_BorDebugNameIndexToName'),
  2059.      (Proc: @@BorDebugRegIndexToName;           Name: '_BorDebugRegIndexToName'),
  2060.      (Proc: @@BorDebugTypeIndexToString;        Name: '_BorDebugTypeIndexToString'),
  2061.      (Proc: @@BorDebugUnmangle;                 Name: '_BorDebugUnmangle'));
  2062.  
  2063. initialization
  2064.   BorDebugDLL := TDll.Create(BorDebugName, Entries);
  2065. {$ELSE}
  2066.   function  BorDebugRegisterFile;             external BorDebugName name '_BorDebugRegisterFile';
  2067.   procedure BorDebugUnregisterFile;           external BorDebugName name '_BorDebugUnregisterFile';
  2068.   function  BorDebugSubSectionDirOffset;      external BorDebugName name '_BorDebugSubSectionDirOffset';
  2069.   function  BorDebugSubSectionCount;          external BorDebugName name '_BorDebugSubSectionCount';
  2070.   procedure BorDebugSubSection;               external BorDebugName name '_BorDebugSubSection';
  2071.   procedure BorDebugModule;                   external BorDebugName name '_BorDebugModule';
  2072.   procedure BorDebugModuleSegment;            external BorDebugName name '_BorDebugModuleSegment';
  2073.   procedure BorDebugStartSymbols;             external BorDebugName name '_BorDebugStartSymbols';
  2074.   procedure BorDebugNextSymbol;               external BorDebugName name '_BorDebugNextSymbol';
  2075.   procedure BorDebugDumpBrowserInfo;          external BorDebugName name '_BorDebugDumpBrowserInfo';
  2076.   procedure BorDebugSymbolCOMPILE;            external BorDebugName name '_BorDebugSymbolCOMPILE';
  2077.   procedure BorDebugSymbolREGISTER;           external BorDebugName name '_BorDebugSymbolREGISTER';
  2078.   procedure BorDebugSymbolCONST;              external BorDebugName name '_BorDebugSymbolCONST';
  2079.   procedure BorDebugSymbolUDT;                external BorDebugName name '_BorDebugSymbolUDT';
  2080.   procedure BorDebugSymbolSSEARCH;            external BorDebugName name '_BorDebugSymbolSSEARCH';
  2081.   procedure BorDebugSymbolOBJNAME;            external BorDebugName name '_BorDebugSymbolOBJNAME';
  2082.   procedure BorDebugSymbolGPROCREF;           external BorDebugName name '_BorDebugSymbolGPROCREF';
  2083.   procedure BorDebugSymbolGDATAREF;           external BorDebugName name '_BorDebugSymbolGDATAREF';
  2084.   procedure BorDebugSymbolEDATA;              external BorDebugName name '_BorDebugSymbolEDATA';
  2085.   procedure BorDebugSymbolEPROC;              external BorDebugName name '_BorDebugSymbolEPROC';
  2086.   function  BorDebugSymbolUSES;               external BorDebugName name '_BorDebugSymbolUSES';
  2087.   function  BorDebugSymbolNAMESPACE;          external BorDebugName name '_BorDebugSymbolNAMESPACE';
  2088.   function  BorDebugSymbolUSING;              external BorDebugName name '_BorDebugSymbolUSING';
  2089.   function  BorDebugSymbolPCONSTANT;          external BorDebugName name '_BorDebugSymbolPCONSTANT';
  2090.   procedure BorDebugSymbolBPREL32;            external BorDebugName name '_BorDebugSymbolBPREL32';
  2091.   procedure BorDebugSymbolLDATA32;            external BorDebugName name '_BorDebugSymbolLDATA32';
  2092.   procedure BorDebugSymbolGDATA32;            external BorDebugName name '_BorDebugSymbolGDATA32';
  2093.   procedure BorDebugSymbolPUB32;              external BorDebugName name '_BorDebugSymbolPUB32';
  2094.   procedure BorDebugSymbolLPROC32;            external BorDebugName name '_BorDebugSymbolLPROC32';
  2095.   function  BorDebugSymbolGPROC32;            external BorDebugName name '_BorDebugSymbolGPROC32';
  2096.   procedure BorDebugSymbolTHUNK32;            external BorDebugName name '_BorDebugSymbolTHUNK32';
  2097.   procedure BorDebugSymbolBLOCK32;            external BorDebugName name '_BorDebugSymbolBLOCK32';
  2098.   procedure BorDebugSymbolWITH32;             external BorDebugName name '_BorDebugSymbolWITH32';
  2099.   procedure BorDebugSymbolLABEL32;            external BorDebugName name '_BorDebugSymbolLABEL32';
  2100.   procedure BorDebugSymbolENTRY32;            external BorDebugName name '_BorDebugSymbolENTRY32';
  2101.   function  BorDebugSymbolOPTVAR32;           external BorDebugName name '_BorDebugSymbolOPTVAR32';
  2102.   procedure BorDebugSymbolPROCRET32;          external BorDebugName name '_BorDebugSymbolPROCRET32';
  2103.   procedure BorDebugSymbolSAVREGS32;          external BorDebugName name '_BorDebugSymbolSAVREGS32';
  2104.   function  BorDebugSymbolSLINK32;            external BorDebugName name '_BorDebugSymbolSLINK32';
  2105.   procedure BorDebugSrcModule;                external BorDebugName name '_BorDebugSrcModule';
  2106.   procedure BorDebugSrcModuleRanges;          external BorDebugName name '_BorDebugSrcModuleRanges';
  2107.   procedure BorDebugSrcModuleSources;         external BorDebugName name '_BorDebugSrcModuleSources';
  2108.   procedure BorDebugSrcModuleSourceRanges;    external BorDebugName name '_BorDebugSrcModuleSourceRanges';
  2109.   procedure BorDebugSrcModuleLineNumbers;     external BorDebugName name '_BorDebugSrcModuleLineNumbers';
  2110.   procedure BorDebugGlobalSym;                external BorDebugName name '_BorDebugGlobalSym';
  2111.   procedure BorDebugGlobalTypes;              external BorDebugName name '_BorDebugGlobalTypes';
  2112.   procedure BorDebugTypeFromIndex;            external BorDebugName name '_BorDebugTypeFromIndex';
  2113.   procedure BorDebugTypeFromOffset;           external BorDebugName name '_BorDebugTypeFromOffset';
  2114.   procedure BorDebugTypeMODIFIER;             external BorDebugName name '_BorDebugTypeMODIFIER';
  2115.   procedure BorDebugTypePOINTER;              external BorDebugName name '_BorDebugTypePOINTER';
  2116.   procedure BorDebugTypeARRAY;                external BorDebugName name '_BorDebugTypeARRAY';
  2117.   procedure BorDebugTypeCLASS;                external BorDebugName name '_BorDebugTypeCLASS';
  2118.   procedure BorDebugTypeUNION;                external BorDebugName name '_BorDebugTypeUNION';
  2119.   procedure BorDebugTypeENUM;                 external BorDebugName name '_BorDebugTypeENUM';
  2120.   procedure BorDebugTypePROCEDURE;            external BorDebugName name '_BorDebugTypePROCEDURE';
  2121.   procedure BorDebugTypeMFUNCTION;            external BorDebugName name '_BorDebugTypeMFUNCTION';
  2122.   function  BorDebugTypeVTSHAPE;              external BorDebugName name '_BorDebugTypeVTSHAPE';
  2123.   function  BorDebugTypeLABEL;                external BorDebugName name '_BorDebugTypeLABEL';
  2124.   procedure BorDebugTypeSET;                  external BorDebugName name '_BorDebugTypeSET';
  2125.   procedure BorDebugTypeSUBRANGE;             external BorDebugName name '_BorDebugTypeSUBRANGE';
  2126.   procedure BorDebugTypePARRAY;               external BorDebugName name '_BorDebugTypePARRAY';
  2127.   procedure BorDebugTypePSTRING;              external BorDebugName name '_BorDebugTypePSTRING';
  2128.   procedure BorDebugTypeCLOSURE;              external BorDebugName name '_BorDebugTypeCLOSURE';
  2129.   procedure BorDebugTypePROPERTY;             external BorDebugName name '_BorDebugTypePROPERTY';
  2130.   function  BorDebugTypeLSTRING;              external BorDebugName name '_BorDebugTypeLSTRING';
  2131.   function  BorDebugTypeVARIANT;              external BorDebugName name '_BorDebugTypeVARIANT';
  2132.   procedure BorDebugTypeCLASSREF;             external BorDebugName name '_BorDebugTypeCLASSREF';
  2133.   function  BorDebugTypeWSTRING;              external BorDebugName name '_BorDebugTypeWSTRING';
  2134.   function  BorDebugTypeARGLIST;              external BorDebugName name '_BorDebugTypeARGLIST';
  2135.   procedure BorDebugTypeStartFIELDLIST;       external BorDebugName name '_BorDebugTypeStartFIELDLIST';
  2136.   procedure BorDebugTypeNextFIELDLIST;        external BorDebugName name '_BorDebugTypeNextFIELDLIST';
  2137.   function  BorDebugTypeDERIVED;              external BorDebugName name '_BorDebugTypeDERIVED';
  2138.   procedure BorDebugTypeBITFIELD;             external BorDebugName name '_BorDebugTypeBITFIELD';
  2139.   function  BorDebugTypeMETHODLIST;           external BorDebugName name '_BorDebugTypeMETHODLIST';
  2140.   procedure BorDebugTypeBCLASS;               external BorDebugName name '_BorDebugTypeBCLASS';
  2141.   procedure BorDebugTypeVBCLASS;              external BorDebugName name '_BorDebugTypeVBCLASS';
  2142.   procedure BorDebugTypeIVBCLASS;             external BorDebugName name '_BorDebugTypeIVBCLASS';
  2143.   procedure BorDebugTypeENUMERATE;            external BorDebugName name '_BorDebugTypeENUMERATE';
  2144.   procedure BorDebugTypeFRIENDFCN;            external BorDebugName name '_BorDebugTypeFRIENDFCN';
  2145.   function  BorDebugTypeINDEX;                external BorDebugName name '_BorDebugTypeINDEX';
  2146.   procedure BorDebugTypeMEMBER;               external BorDebugName name '_BorDebugTypeMEMBER';
  2147.   procedure BorDebugTypeSTMEMBER;             external BorDebugName name '_BorDebugTypeSTMEMBER';
  2148.   procedure BorDebugTypeMETHOD;               external BorDebugName name '_BorDebugTypeMETHOD';
  2149.   procedure BorDebugTypeNESTTYPE;             external BorDebugName name '_BorDebugTypeNESTTYPE';
  2150.   procedure BorDebugTypeVFUNCTAB;             external BorDebugName name '_BorDebugTypeVFUNCTAB';
  2151.   function  BorDebugTypeFRIENDCLS;            external BorDebugName name '_BorDebugTypeFRIENDCLS';
  2152.   function  BorDebugTypeCHAR;                 external BorDebugName name '_BorDebugTypeCHAR';
  2153.   function  BorDebugTypeSHORT;                external BorDebugName name '_BorDebugTypeSHORT';
  2154.   function  BorDebugTypeUSHORT;               external BorDebugName name '_BorDebugTypeUSHORT';
  2155.   function  BorDebugTypeLONG;                 external BorDebugName name '_BorDebugTypeLONG';
  2156.   function  BorDebugTypeULONG;                external BorDebugName name '_BorDebugTypeULONG';
  2157.   function  BorDebugTypeREAL32;               external BorDebugName name '_BorDebugTypeREAL32';
  2158.   function  BorDebugTypeREAL64;               external BorDebugName name '_BorDebugTypeREAL64';
  2159.   function  BorDebugTypeREAL80;               external BorDebugName name '_BorDebugTypeREAL80';
  2160.   function  BorDebugTypeQUADWORD;             external BorDebugName name '_BorDebugTypeQUADWORD';
  2161.   function  BorDebugTypeUQUADWORD;            external BorDebugName name '_BorDebugTypeUQUADWORD';
  2162.   function  BorDebugTypeREAL48;               external BorDebugName name '_BorDebugTypeREAL48';
  2163.   function  BorDebugNamesTotalNames;          external BorDebugName name '_BorDebugNamesTotalNames';
  2164.   procedure BorDebugNameIndexToUnmangledName; external BorDebugName name '_BorDebugNameIndexToUnmangledName';
  2165.   procedure BorDebugNameIndexToName;          external BorDebugName name '_BorDebugNameIndexToName';
  2166.   procedure BorDebugRegIndexToName;           external BorDebugName name '_BorDebugRegIndexToName';
  2167.   procedure BorDebugTypeIndexToString;        external BorDebugName name '_BorDebugTypeIndexToString';
  2168.   function  BorDebugUnmangle;                 external BorDebugName name '_BorDebugUnmangle';
  2169. {$ENDIF}
  2170.  
  2171. end.
  2172.